isFile() && strpos($entry, '_testcase.')>0) { echo basename($entry); require_once($entry); echo '
...pass!
'; }}?>
This section of code. Seen in a CMS. Why do I get an error when I visit
element_testcase.phpWarning: require_once(../../simple_html_dom_reader.php): failed to open stream: No such file or directory in C:\inetpub\wwwroot\web\inc\simplehtmldom_1_5\testcase\reader\element_testcase.php on line 6Fatal error: require_once(): Failed opening required '../../simple_html_dom_reader.php' (include_path='.;C:\php\pear') in C:\inetpub\wwwroot\web\inc\simplehtmldom_1_5\testcase\reader\element_testcase.php on line 6
I mean the error. The description has a value, but this page does not call other files, and Directoryiterator this class and GETCWD () This function, I can not find the full-text search.
In the description, copy the above code, create a new PHP file, in the access, is empty, and this is why???
Reply content:
isFile() && strpos($entry, '_testcase.')>0) { echo basename($entry); require_once($entry); echo '
...pass!
'; }}?>
This section of code. Seen in a CMS. Why do I get an error when I visit
element_testcase.phpWarning: require_once(../../simple_html_dom_reader.php): failed to open stream: No such file or directory in C:\inetpub\wwwroot\web\inc\simplehtmldom_1_5\testcase\reader\element_testcase.php on line 6Fatal error: require_once(): Failed opening required '../../simple_html_dom_reader.php' (include_path='.;C:\php\pear') in C:\inetpub\wwwroot\web\inc\simplehtmldom_1_5\testcase\reader\element_testcase.php on line 6
I mean the error. The description has a value, but this page does not call other files, and Directoryiterator this class and GETCWD () This function, I can not find the full-text search.
In the description, copy the above code, create a new PHP file, in the access, is empty, and this is why???
-
This error is telling you that simple_html_dom_reader.php cannot be loaded, you should check if require_once is not a problem with the path, or whether the file has been deleted
-
Directoryiterator is a PHP built-in class, see http://php.net/manual/zh/class.directoryiterator.php used to iterate over the directory, GETCWD is to get the current working directory, PHP Built-in methods
-
In fact, this time you use Xdebug single-step or run a tracking minute to know where the problem is ...