Results 1 to 3 of 3

Thread: PHP - File Manipulation Question

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Posts
    258

    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.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Posts
    258
    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.

  3. #3
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    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
    My evil laugh has a squeak in it.

    kristopherwilson.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width