Hi,
I am trying to write some variables to a file and here is the delema:

echo $d;
$what="$a|$b|$c|$d"."\n";

$file2=fopen("pathtofile.txt","w");
$fp=fwrite($file2,$what,4096);
fclose($file2);

The above DOESN'T work....but this does:

$what="$a|$b|$c"."\n";

$file2=fopen("pathtofile.txt","w");
$fp=fwrite($file2,$what,4096);
fclose($file2);

I know $d exists...because I can echo it out before I'm adding it to the string, as seen above. Any idea why this last variable doesn't get included in the string? I can replace the $d="varible from the web" with
$d="hard coded text" and it works just fine.

I'm on an Apache server.

Any ideas??

    P.S. I've also tried fputs with the same results.

      The script that is trying to write to the file is a child window created by javascript with newwin().
      Could this be the problem? The child window can't write to a file??

        Write a Reply...