php trouble

php trouble

Posted by: duosi
Posted on: 2006-05-29 23:07:00

I got mu php scripts uploaded.
but it came out below result when running


Warning: file_get_contents(): URL file-access is disabled in the server configuration in /home/.dudu/duosi/xuci.net/Listbook.php on line 75

Warning: file_get_contents(http://cmfu.com/script/list_book7.js): failed to open stream: no suitable wrapper could be found in /home/.dudu/duosi/xuci.net/Listbook.php on line 75


does this mean that the server not support file_get_content ?? if it is, can dh turn it on?

thank you!

可以显示中文吗?

Re: php trouble

Posted by: doeleman
Posted on: 2006-05-30 00:09:00

file_get_contents has been disabled for security reasons (most responsible hosts do this nowadays).

See the wiki for an explanation and a workaround:
Allow url fopen
CURL



Re: php trouble

Posted by: silkrooster
Posted on: 2006-05-30 00:18:00

All it means it that the script is trying to access an absolute url address. http://wiki.dreamhost.com/index.php/Allow_url_fopen To get around this "security risk" you can use curl http://wiki.dreamhost.com/index.php/CURL if you are trying to access another domain, or use a relative address if you are trying to access your own domain.
Examples of absolute vs. relative:
Absolute is http://www.example.com/directory/file.html
Relative is directory/file.html
Silk

Tags: php scriptsfile accesshttpserver configurationopen streamuploadedrunningurl