#22167 [Fbk->Bgs]: require syntax changed
| From: | sniper@php.net | Date: | Tue, 11 Feb 2003 14:15:42 +0000 |
| Subject: | #22167 [Fbk->Bgs]: require syntax changed | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-32764@lists.php.net to get a copy of this message | ||
ID: 22167
Updated by: sniper@php.net
Reported By: s.birkhoff@liwest.at
-Status: Feedback
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Windows
PHP Version: 4.3.0
New Comment:
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.
Thank you for your interest in PHP.
There's only one change..and it's how the paths work.
The syntax is not changed.
And there is already bug report about the path issue.
Previous Comments:
------------------------------------------------------------------------
[2003-02-11 07:54:15] s.birkhoff@liwest.at
What won't work is:
require ("/mypath/thisfile.php");
require ($mypath."thisfile.php");
what work is:
require '/mypath/thisfile.php';
------------------------------------------------------------------------
[2003-02-11 07:41:08] sniper@php.net
This really hasn't changed...WHAT works and what doesn't?
------------------------------------------------------------------------
[2003-02-11 07:40:31] s.birkhoff@liwest.at
sorry last 2 lines should be:
$classpath = "./mypath/";
require($classpath."thisfile.php");
------------------------------------------------------------------------
[2003-02-11 07:37:29] s.birkhoff@liwest.at
require/include/require_once/include_once would only in the way
require './mypath/thisfile.php'
and no more as written in the documentation
require ("./mypath/thisfile.php") this will cause in a error:
failed to create stream...
it also won't work the way require
$classpath = "./mypath/";
($classpath."thisfile.php");
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22167&edit=1