| Welcome to WebmasterWorld Guest from 188.8.131.52 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|Opening Local Files Vs Opening Remote Files|
Using PHP's file();
| 5:56 pm on Dec 31, 2006 (gmt 0)|
I'm trying to open a file in a script.
The file I'm trying to open is a .csv and is located on another website.
If I use:
I get a URL file-access is disabled error.
If I open the file myself, save it to my site, and use:
The data works just fine.
Is the error I'm getting based on how my website is configured, or based on how the other website is configured.
| 6:02 pm on Dec 31, 2006 (gmt 0)|
Can you give the specific error?
It appears that your server does not have permissions to access theirs, in which case the problem resides on their end, but it may not be a problem at all...for them ;)
| 6:34 pm on Dec 31, 2006 (gmt 0)|
Thanks for the reply,
The specific error I'm getting is this:
Warning: file(): URL file-access is disabled in the server configuration in X.php on line Y
Warning: file(http://www.exampe.com/file.csv): failed to open stream: no suitable wrapper could be found in X.php on line Y
| 7:17 pm on Dec 31, 2006 (gmt 0)|
Actually it may be your configuration. Check allow_url_fopen [us3.php.net] to make sure that it is enabled in your php.ini file.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved