Results 1 to 2 of 2

Thread: file_get_contents

  1. #1
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default file_get_contents

    I have a script that is attempting to store the contents of a file on my server to a variable as a string, which later will be printed out. The file is the <map></map> tag of an image map, but for some reason it will not grab the content.

    The server I am running is linux based, and the php.ini file is set to allow file_get_contents, as I did a test of pulling in just a regular text file.
    I tried the UNIX relative path, UNIX absolute path, DOCROOT relative path, DOCROOT absolute path. but nothing is grabbing the contents.

    I also tried both the (.map) and (.txt) extensions on all 4 path types, again nothing.

    There is no error/warning being reported by PHP, and the file itself is viewable

    PHP Code:
    $map '';
    $map file_get_contents("http://vuteksupport.com/images/parts/maps/aa94005-7.map"); 
    I also tried fopen / fread and still no errors, no blockcode.

    I checked on php.net to see if there was sometype of flag I needed to enable, but I couldn't see any... any help? Thanks

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    okay i feel retarded... it didnt show up in the variable output because its html tags. when i check the source of the file it shows ...

    I believe the appropriate term is DUHHHHH!

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
  •