2015-01-09 30 views
-1

repalce它在哪裏可以找到的file_get_contents()函數,並與捲曲repalce它在那裏我能找到的file_get_contents()函數,並與捲曲

一個PHP錯誤遇到

嚴重性:警告

消息:file_get_contents()[function.file-get-contents]:https:// wrapper在服務器配置中被禁用allow_url_fopen = 0

Filename:control的LER/videos.php

行號:281

+0

EHM,因爲它說,你可以在文件'controllers/videos.php'中找到該呼叫... – user4416936

+0

如何解決它? –

回答

1

編輯文件controllers/videos.php和更換file_get_contents()呼叫與電話libcurl如下所示PHP : how can use curl instead file_get_contents,所以:

$url = "https://graph.facebook.com/" . base_url() . "videos/videos_watch/" . $id_video'; 
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt($ch, CURLOPT_URL, $url); 
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);  
$data = curl_exec($ch); 
curl_close($ch); 
// do something with $data 
+0

(file_get_contents(「https://graph.facebook.com/」。base_url()。「videos/videos_watch /」。$ id_video)); –

+0

根據評論添加了網址 – user4416936