qmqmqm Posted March 4, 2009 Share Posted March 4, 2009 Hi everyone, I have the following php file: if I open the php file directly from browser, it will generate the "mytest" file. If I use ajax to call the php file however, the "mytest" file will not be generated. However I do receive the "hi" back from the ajax call. Does anyone know why this is? <?php $file_path = "/mytest"; $file=fopen($file_path, "w"); fwrite($file, "test..."); fclose($file); echo "hi"; ?> Link to comment https://forums.phpfreaks.com/topic/148004-ajax-vs-directly-visiting-php-file/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.