At 10:02 26.02.2003, George Pitcher said:
--------------------[snip]--------------------
>Hi all,
>
>Back on the list after a long break.
>
>I want to be able to write all my sql queries (well at least the ones that
>change or create records) to a log file.
>
>However some of the pages that contain these queries are just used to
>redirect the user depending on the result.
>
>Writing to a file id not permitted before creating the header for the
>redirect.
--------------------[snip]--------------------
This works for me:
<?php
$hf = fopen('cache/sample.txt', 'w');
fwrite($hf, 'Test');
fclose($hf);
header('Location: http://www.php.net/');
?>
(./cache is an apache-writable directory on my test server)
This seamlessly writes the file, then redirects to the requested site...
what errors do you get?
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php