Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: fopen() problem

  1. #11
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    Ah I see, that makes sense, I guess it would be a pretty big security issue if PHP could open files and edit them on someone's computer.

  2. #12
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Haha, yeah:
    Code:
    $gl = glob('C://*');
    Super unsecure.
    Last edited by Nile; 01-09-2009 at 09:13 PM.
    Jeremy | jfein.net

  3. #13
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    Does that search through all files on their PC? lol

  4. #14
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Well - if you were allowed to open files on the hard drive. But PHP doesn't allow it(thank god).
    Jeremy | jfein.net

  5. #15
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    When it says 'your system' it means 'the system on which the PHP script is running' — i.e. your server. The webserver cannot (directly) access files on the client machine.

    This isn't a question of what PHP allows: HTTP doesn't provide a mechanism to do it (for fairly obvious reasons). Of course, if you have an FTP or SSH server set up on the HTTP client machine, it's a different matter.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Tags for this Thread

Bookmarks

Posting Permissions

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