|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2001-10-08 12:17 UTC] stefan dot cano at virtualxs dot com
 This script doesn't work.
<?php
        require("http://localhost/test.php");
?>
When I enter the URL http://localhost/test.php in my browser directly it works.
When I use the following script it works:
<?php
          require("c:/inetpub/wwwroot/test.php");
?>
I checked all rights withing IIS and these are ok.
PHP.ini is configured with defaults.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Sat Oct 25 03:00:01 2025 UTC | 
This script doesn't work, it results in error: <?php require("http://localhost/test.php"); ?> The follow error is generated: Fatal error: Failed opening required 'http://localhost/test.php' (include_path='.;c:\php;c:\php\includes') in c:\inetpub\wwwroot\live3.php on line 2 When I enter the URL http://localhost/test.php in my browser directly it works. When I use the following script it works: <?php require("c:/inetpub/wwwroot/test.php"); ?> I checked all rights withing IIS and these are ok. PHP.ini is configured with defaults.Reproduced with PHP-4.0.6, Apache 1.3.20 on Win2K. require("http://localhost/test.php"); // fails include("http://localhost/test.php"); // fails fpassthru(fopen("http://localhost/test.php","r")); // worksPHP-4.0.6, IIS5.0 on Win2K. fpassthru(fopen("http://localhost/test.php","r")); //works thanks