Results 1 to 6 of 6
  1. #1

    Question Editing files with PHP

    I want to make a script that gets a file name, opens it, prints it to a textarea field, and then lets the user modify it.
    I've tried a lot of stuff... nothing works.
    I'd enjoy any help.
    Thanks!

  2. #2
    the first thing :
    you must have enough right to open a file.

    set access property of the file in OS first. (exampleet to 777 for linux)
    Life's Base on your heart.

  3. #3
    Join Date
    May 2002
    Location
    UK
    Posts
    2,994
    You should be able to get away with 757 to open and write to files as many servers won't let you use 777

  4. #4
    I created the file, chmoded it to 777, and then it won't let me edit it.
    www.jportalhome.com

  5. #5
    Join Date
    Oct 2002
    Location
    Canada
    Posts
    3,100
    maybe you are opening file as read only :
    fopen ($file, "r")
    and should open it for writing
    fopen ($file, "w")

    look at php.net/fopen

  6. #6
    Haha, ok, I found the problem. I was opening it for writing, so that wasn't the problem... thanks for the help.
    www.jportalhome.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
  •