我是PHP的新手,我使用了file_get_contents语法,但它返回错误说
Warning: file_get_contents(url: http://localhost/setc.php?userid=123&panelid=1): failed to open stream: No error in
这是我使用的代码
$homepage = file_get_contents('url: '.Config_Reader::readConfig('localhome')->base_url.'setc.php?userid=123&panelid=1');
echo $homepage;
任何人都可以帮我这个
答案 0 :(得分:0)
尝试这样使用:
$homepage = file_get_contents("'".Config_Reader::readConfig('localhome')->base_url."setc.php?userid=123&panelid=1'");
答案 1 :(得分:0)
我认为你不需要网址。我使用这样的file_get_contents:
file_get_contents('http://stackoverflow.com/questions/27915659/file-get-content-not-working-throws-an-error');
对我来说很好。