![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Aug 2005
Posts: 12
Rep Power: 0
![]() |
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? |
|
|
|
|
|
#2 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 747
Rep Power: 3
![]() |
Yes.
If the web daemon doesn't have write permissions to the directory, it should prevent it. |
|
|
|
|
|
#3 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unix commands compatible with Windows? | titaniumdecoy | Bash / Shell Scripting | 7 | Oct 5th, 2006 7:25 AM |
| OnlineTextEditor.Com! | Sane | Show Off Your Open Source Projects | 43 | Jun 16th, 2006 8:55 AM |
| Command Prompt | SkyPioneer | Coder's Corner Lounge | 5 | May 3rd, 2006 10:07 PM |
| shutil.copy corrupting files? | TimL | Python | 0 | Feb 20th, 2005 3:32 PM |