Oliverkahn Posted April 15, 2014 Share Posted April 15, 2014 can this work??? <?PHP $file_handle = fopen("testFile.html", "w"); $file_contents = "Some test text"; fwrite($file_handle, $file_contents); fclose($file_handle); print "file created and written to"; ?> instead of this... <?PHP $file_handle = fopen("testFile.txt", "w"); $file_contents = "Some test text"; fwrite($file_handle, $file_contents); fclose($file_handle); print "file created and written to"; ?> Quote Link to comment Share on other sites More sharing options...
Ch0cu3r Posted April 15, 2014 Share Posted April 15, 2014 yes Whats the problem? Quote Link to comment Share on other sites More sharing options...
dalecosp Posted April 15, 2014 Share Posted April 15, 2014 Yes, you can write to different file types; it may depend on the system what your actual result is. For the most part, in a server environment, the content determines the way it's handled.You might also look into using file_put_contents() instead of the fopen/fwrite/fclose routine, if possible. Quote Link to comment Share on other sites More sharing options...
Oliverkahn Posted April 15, 2014 Author Share Posted April 15, 2014 thanks I taught it's only .txt files that can be created Quote Link to comment Share on other sites More sharing options...
boompa Posted April 15, 2014 Share Posted April 15, 2014 Why wouldn't you just try it??? SMH Quote Link to comment Share on other sites More sharing options...
Oliverkahn Posted April 16, 2014 Author Share Posted April 16, 2014 hmm Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.