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]
From: "Ford, Mike [LSS]" <[EMAIL PROTECTED]>
> Mind you, there are exceptions: exit(), for example, is a language
construct
> but requires the parens (at least, that's what the fine manual appears to
> say, and I've not tested it without!).
Only if you want to pass an exit value, i.e. exit(101);
On 11 February 2004 00:38, Adam Bregenzer contributed these pearls of
wisdom:
> On Tue, 2004-02-10 at 19:06, Richard Davey wrote:
>> This is slightly off-topic, but related to the include()
>> function. What is the given "standard" regarding when you
>> should or shouldn't use braces on a function
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
On Tue, 2004-02-10 at 19:06, Richard Davey wrote:
> This is slightly off-topic, but related to the include() function.
> What is the given "standard" regarding when you should or shouldn't
> use braces on a function.
[snip]
> Both work just fine. The manual includes examples of both methods. So
>
> Hello John,
>
> Tuesday, February 10, 2004, 8:20:50 PM, you wrote:
>
> JWH> include($_CONF['path'] . '/test.php');
>
> This is slightly off-topic, but related to the include() function.
> What is the given "standard" regarding when you should or shouldn't
> use braces on a function.
>
> For e
Hello John,
Tuesday, February 10, 2004, 8:20:50 PM, you wrote:
JWH> include($_CONF['path'] . '/test.php');
This is slightly off-topic, but related to the include() function.
What is the given "standard" regarding when you should or shouldn't
use braces on a function.
For example:
include "$dir
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
Hi there,
I have 3 files in nested subdirectories
(1) /test.php
(2) /subdir1/test.php
(3) /subdir1/subdir2/test.php
(1) contains
//
(2) and (3) contains
/
if I call (3) it loops forever in (2) trying to
including itself.
I expected (2) correctly incl
12 matches
Mail list logo