Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 15th, 2006, 12:18 PM   #1
mleonid
Newbie
 
Join Date: Aug 2005
Posts: 12
Rep Power: 0 mleonid is on a distinguished road
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?
mleonid is offline   Reply With Quote
Old Aug 15th, 2006, 12:45 PM   #2
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 763
Rep Power: 3 Jimbo is on a distinguished road
Yes.
If the web daemon doesn't have write permissions to the directory, it should prevent it.
Jimbo is offline   Reply With Quote
Old Aug 15th, 2006, 2:03 PM   #3
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:44 PM.

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