|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-30 12:03 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 10:00:01 2025 UTC |
Description: ------------ With the parameters "allow_url_fopen" = "on" and "allow_url_include" = "on" I can include URL like files, but I cannot declare the classes and cannot use the functions declared in the include file... Reproduce code: --------------- /* FILE PHPbug.php */ <?php // "allow_url_fopen" and "allow_url_include" is "on" define("DIR", "http://localhost:8080/MyClass.php"); require_once(DIR); $bug = new MyClass(); //ERROR, dont found the class... echo $bug->getNumber(); echo "<br>"; echo callFunction(); //ERROR, dont found the function... ?> /* FILE MyClass.php */ <?php class MyClass { public function getNumber() { return 100; } } function callFunction() { return "ok";} ?> Expected result: ---------------- I expect... 100 ok Actual result: -------------- Fatal error: Class 'MyClass' not found in C:\MARCIO\public_html\PHPbug.php on line 11