use stream_resolve_include_path
authorChristian Weiske <cweiske@cweiske.de>
Wed, 14 May 2014 15:58:10 +0000 (17:58 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 14 May 2014 15:58:10 +0000 (17:58 +0200)
scripts/index.php
scripts/search.php
www/www-header.php

index 5da912e2aa9750faceaa004c20841cb5847feceb..c1e67af4cb6f04f14d32acdfaadc45ed23d0a12f 100644 (file)
@@ -9,9 +9,7 @@ set_include_path(
 spl_autoload_register(
     function ($class) {
         $file = str_replace(array('\\', '_'), '/', $class) . '.php';
-        $hdl = @fopen($file, 'r', true);
-        if ($hdl !== false) {
-            fclose($hdl);
+        if (stream_resolve_include_path($file)) {
             require $file;
         }
     }
index 4de514f06ea6af2c5c273dd66f10b40815f525ca..d7d1b643ee1b537c608e8cef629d0cd6b54f4c54 100644 (file)
@@ -9,9 +9,7 @@ set_include_path(
 spl_autoload_register(
     function ($class) {
         $file = str_replace(array('\\', '_'), '/', $class) . '.php';
-        $hdl = @fopen($file, 'r', true);
-        if ($hdl !== false) {
-            fclose($hdl);
+        if (stream_resolve_include_path($file)) {
             require $file;
         }
     }
index c99f8c8ed774b54610ced1f97d7df067612b6d28..ef948e458782faa42996269236ab1c93618c71d5 100644 (file)
@@ -9,9 +9,7 @@ set_include_path(
 spl_autoload_register(
     function ($class) {
         $file = str_replace(array('\\', '_'), '/', $class) . '.php';
-        $hdl = @fopen($file, 'r', true);
-        if ($hdl !== false) {
-            fclose($hdl);
+        if (stream_resolve_include_path($file)) {
             require $file;
         }
     }