CodeIgniter Forums
write_file not working! - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: write_file not working! (/showthread.php?tid=5245)



write_file not working! - El Forum - 01-13-2008

[eluser]Roosevelt![/eluser]
Hi everyone,
This is a very weird problem. I have the following lines of code:

Code:
$readFile = read_file("./readsource/file.txt");

$writeFile = write_file("./writesource/test.php", $readFile, 'w+');

I tried checking $writeFile using if, and found that it isn't writing the file. But does read the file from readsource just fine when I echo the contents.

I am using Apache on Windows and the folder writesource has full read/write permission.

Any ideas what is going wrong?