Lefu Posted November 28, 2007 Share Posted November 28, 2007 hello, I hope I am in the right forum. I am trying to create a file using php file(). can some one help me? fopen() is no allowed on the server. Link to comment https://forums.phpfreaks.com/topic/79229-creating-a-file-using-function/ Share on other sites More sharing options...
schme16 Posted November 28, 2007 Share Posted November 28, 2007 You can try the function file_put_contents and file_get_contents... but seeing as their aliases they too may be disabled.... Link to comment https://forums.phpfreaks.com/topic/79229-creating-a-file-using-function/#findComment-401029 Share on other sites More sharing options...
v08i Posted November 28, 2007 Share Posted November 28, 2007 for creating a file you must have write permissions to the directory in which you are creating the file. check with your server admin, if he allows you to do so. then you can use any of the functions mentioned in the previous post -- Vijay Link to comment https://forums.phpfreaks.com/topic/79229-creating-a-file-using-function/#findComment-401053 Share on other sites More sharing options...
Orio Posted November 28, 2007 Share Posted November 28, 2007 You can also use exec() to create a file (the command you need to pass depends on your OS). But if fopen() is blocked, I doubt exec() isn't. Orio. Link to comment https://forums.phpfreaks.com/topic/79229-creating-a-file-using-function/#findComment-401059 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.