SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast the dooode's Avatar
    Join Date
    Jun 2004
    Location
    UK
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    file_get_contents()

    Im trying to use the function: file_get_contents() but keep on getting the following error message: "URL file-access is disabled in the server configuration".

    What do i need to do to get this working?

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,806
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    probably access to your php.ini file.
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    SitePoint Enthusiast the dooode's Avatar
    Join Date
    Jun 2004
    Location
    UK
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have access to the php.ini file... which setting looks after the file-access?

  4. #4
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,806
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Just had a whistle through the php.ini file and I think I may be wrong! It must be the way your server is set up which unfortunately I can't help you with!

    Sorry!
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  5. #5
    SitePoint Enthusiast the dooode's Avatar
    Join Date
    Jun 2004
    Location
    UK
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah i couldn't see anything obviously relating to this error either.
    But thanks anyway spikeZ.

  6. #6
    SitePoint Enthusiast the dooode's Avatar
    Join Date
    Jun 2004
    Location
    UK
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does anyone have any other ideas?

  7. #7
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    RTFM


    You can use a URL as a filename with this function if the fopen wrappers have been enabled. See fopen() for more details on how to specify the filename and Appendix I for a list of supported URL protocols.


    http://us2.php.net/manual/en/functio...t-contents.php

  8. #8
    Now with customized title Jump's Avatar
    Join Date
    Sep 2002
    Location
    The Restaurant at The End of The Universe
    Posts
    1,423
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to set "allow_url_fopen" in php.ini to access remote urls as a file.


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
  •