|
-
Jun 5th, 2003, 08:59 AM
#1
Thread Starter
Hyperactive Member
PHP - File Manipulation Question
I'm new to php and I'm looking for File Handling information.
A quick search on the web seems to suggest that I can write to a file, open a file and even append to a file... but the only way they seem to actually get a file created on the server is to actually upload it.
Is there a way to create a file on the server using php.
For example, say when a new user fills in a form, his details are saved to a text file.
*I don't want to use a Database to store this info*
TIA
Last edited by LucaUWF; Jun 5th, 2003 at 11:35 AM.
-
Jun 5th, 2003, 09:18 AM
#2
Thread Starter
Hyperactive Member
Ok, according to one site if I try to write to a file that doesn't exist it attempts to create it.
But in the next line it says you can only write to a file with permissions set to enable this enable chmod777 or something.
Question is, if it doesn't exist at the time... how?
Can you set a folder to be writtable, and if so, would this work?
TIA
Last edited by LucaUWF; Jun 5th, 2003 at 11:38 AM.
-
Jun 5th, 2003, 11:57 AM
#3
Stuck in the 80s
What the site meant was that the folder (that you're going to create the file in) must be set to 777 in order to create it.
The best resource on PHP functions is hands down the PHP Manual. Check out: http://www.php.net/manual/en/ref.filesystem.php
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|