// Tools::file_get_contents load with file_get_content for local paths

This commit is contained in:
Rémi Gaillard
2013-01-28 19:01:54 +01:00
parent 2da4ae138e
commit d920c050b4
+2 -3
View File
@@ -1277,10 +1277,9 @@ class ToolsCore
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)));
if (in_array(ini_get('allow_url_fopen'), array('On', 'on', '1')))
if (in_array(ini_get('allow_url_fopen'), array('On', 'on', '1')) || !strstr($url, 'http'))
return @file_get_contents($url, $use_include_path, $stream_context);
elseif (function_exists('curl_init'))
{