Explorar el Código

[php] use recommended path pattern for set_include_path in index.php #7725

Alexander Kuzmenko hace 6 años
padre
commit
407f478ca3
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/generators/genphp7.ml

+ 1 - 1
src/generators/genphp7.ml

@@ -3783,7 +3783,7 @@ class generator (ctx:context) =
 					output_string channel "<?php\n";
 					output_string channel uses;
 					output_string channel "\n";
-					output_string channel ("set_include_path(__DIR__.'/" ^ (String.concat "/" self#get_lib_path) ^ "');\n");
+					output_string channel ("set_include_path(get_include_path().PATH_SEPARATOR.__DIR__.'/" ^ (String.concat "/" self#get_lib_path) ^ "');\n");
 					output_string channel "spl_autoload_register(\n";
 					output_string channel "	function($class){\n";
 					output_string channel "		$file = stream_resolve_include_path(str_replace('\\\\', '/', $class) .'.php');\n";