// Tools::file_get_contents load with file_get_content for local paths
This commit is contained in:
+2
-3
@@ -1277,10 +1277,9 @@ class ToolsCore
|
|||||||
|
|
||||||
public static function file_get_contents($url, $use_include_path = false, $stream_context = null, $curl_timeout = 5)
|
public static function file_get_contents($url, $use_include_path = false, $stream_context = null, $curl_timeout = 5)
|
||||||
{
|
{
|
||||||
if ($stream_context == null)
|
if ($stream_context == null && !strstr($url, 'http'))
|
||||||
$stream_context = @stream_context_create(array('http' => array('timeout' => 5)));
|
$stream_context = @stream_context_create(array('http' => array('timeout' => 5)));
|
||||||
|
if (in_array(ini_get('allow_url_fopen'), array('On', 'on', '1')) || !strstr($url, 'http'))
|
||||||
if (in_array(ini_get('allow_url_fopen'), array('On', 'on', '1')))
|
|
||||||
return @file_get_contents($url, $use_include_path, $stream_context);
|
return @file_get_contents($url, $use_include_path, $stream_context);
|
||||||
elseif (function_exists('curl_init'))
|
elseif (function_exists('curl_init'))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user