Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   PHP (http://www.programmingforums.org/forum29.html)
-   -   Creating new files on the server (http://www.programmingforums.org/showthread.php?t=11084)

mleonid Aug 15th, 2006 12:18 PM

Creating new files on the server
 
Let's say I want to create a new file via script on the server.
Is it done by fopen and fwrite?
How can the server prevent/allow this from happening?

Jimbo Aug 15th, 2006 12:45 PM

Yes.
If the web daemon doesn't have write permissions to the directory, it should prevent it.

DaWei Aug 15th, 2006 2:03 PM

There are also shortcuts that generally amount to a wrapper for fopen, fwrite, and fclose. There are also functions for checking permissions. If you have a C/C++ background, be sure and read the documentation for the PHP version. Even those functions with identical names and purposes often operate a little differently. You might want to scan through the list of functions that you will find on this page and read up on the ones that capture your fancy. The PHP manual is really a very good resource.


All times are GMT -5. The time now is 4:01 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC