Hi,
I want to open a file for debugging purposes and want to know how I can
access it (write to it) from across multiple php files. I want to be
able to write debugging information from within multiple php files. Can
I store the file locally or does it have to be on the server? My php
files are a web hosting company's server.
I tried to store the file pointer returned by fopen as a session
variable. I get a warning: fopen (http://www.mydomain.com/somedir/debug)
failed to open stream: HTTP wrapper does not support writeable
connections.
Thisis followed by a bunch of:
warning: fwrite(): supplied argument is not a valid stream resource
if (!isset($_SESSION['fh'])) {
$fh = fopen("http://www.mydomain.com/somedir/debug", "w");
$_SESSION['fh'] = $fh;
}
......
......
fwrite($_SESSION['fh'], "\nsome debugging text \nmsg: ".$msg."msg_type:
".$msg_type);
Thanx.