Page 1 of 1

Another Question

Posted: Sat Jul 12, 2003 4:43 pm
by mcraft59
Okay got my php scripts working sorta... What I am trying to do now is output to a text file(http://www.mcraft59.com/forma.html).
My current code for my script is:

<?php
$input=fopen("try.txt", "a");
fwrite($input, $name);
fwrite($input, $color);
fclose($input);
?>

Unfortunately, my text file remains empty. I checked file permissions and it has user write enabled.

I checked my form to make sure it was capturing variables correctly: http://www.mcraft59.com/simple.html , it just displays my data through the echo command.

Posted: Sat Jul 12, 2003 5:17 pm
by qartis
What OS is the server running? PHP often needs more flags in Windows.

Posted: Sat Jul 12, 2003 6:18 pm
by macewan
that's a linux box

Posted: Sat Jul 12, 2003 6:43 pm
by qartis
Are you sure that the user/group apache is running as has write access to the file? Just chmod it to 777 for the text, and see if it works.