Im trying to write to file using php but it doesn't see to work.
$file = fopen("test.txt","w");
fwrite($file,"Hello World!");
fclose("$file");
I published the site using the school server. and the php file/text file are all in public_html folder. The problem is, running this into terminal writes the file. Running it as a website doesn't.
How do i fix this?
P.S. I've tried chmod 644, 777, 755