Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    yaz
    yaz is offline
    New to the CF scene
    Join Date
    Jun 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Writing to a file using fopen under /app/

    Hi All,
    I'm trying to write to a text file in a location similar to:
    /app/htdocs/.../someFolder/someFile.txt

    using fopen but i get false handle back. i can't use www. it needs to be /app/... I tried http://app/ but still no joy.

    when i check for file existance using file_exists("/app/...") it returns true. I can even read the file using this path but for some reason i can't write handle to the file.

    Any ideas?

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Could be a chmod issue. You can try that.
    Post some code for us please, so we can help you evaluate further. If you can use something like is_dir() or is_file() and it returns true, and you can read the file but not write to it, I'd say its either your chmod or your fopen mode.

  • #3
    yaz
    yaz is offline
    New to the CF scene
    Join Date
    Jun 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Spot on!
    Thank you.

    --


  •  

    Posting Permissions

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