Hi there again people,
I looks like this thread turned into a 'include' usage
discussion. Well, nothing wrong with that.
The conclusion seems to be that ALL level of nested
included inherit current directory reference for
relative paths from the very first script ( that in
$_SERVER[SCRIPT_NAME]
On Wed, 2004-02-11 at 19:36, John W. Holmes wrote:
> If you use echo, then you should use include().
> If you use print, then you should use include " ".
> Unless you use echo(), then you should use include" "
> and if you use print " ", then you should use include().
> Unless you don't want to. :)
Richard Davey wrote:
include "$dir/file.php"
vs.
include("$dir/file.php")
Both work just fine. The manual includes examples of both methods. So
which do most people consider "the right way" ?
If you use echo, then you should use include().
If you use print, then you should use include " ".
Unles
From: "Alex Hogan" <[EMAIL PROTECTED]>
> Are you saying that it's better not to use relative paths on
include(...)'s,
> require(...)'s and their (x)_once(...) cousins?
>
> That seems awkward to me.
>
> Why would I want to hard code a path, even if I was including additional
> functionality from an
From: "Samuel Ventura" <[EMAIL PROTECTED]>
> I have 3 files in nested subdirectories
>
> (1) /test.php
> (2) /subdir1/test.php
> (3) /subdir1/subdir2/test.php
>
> if I call (3) it loops forever in (2) trying to
> including itself.
>
> Is this a bug or a feature?
A feature?
You make a request for
Hello Samuel,
Tuesday, February 10, 2004, 6:55:24 PM, you wrote:
SV> I have 3 files in nested subdirectories
[snip]
SV> Is this a bug or a feature?
Neither, it's just logic really. The include() function sucks
in the file specified, dropping out to HTML mode to do so. The
included file inherit
6 matches
Mail list logo