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.
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);
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]
Hi there,
I have 3 files in nested subdirectories
(1) /test.php
(2) /subdir1/test.php
(3) /subdir1/subdir2/test.php
(1) contains
//
?php
print hello;
?
(2) and (3) contains
/
?php
include(../test.php);
?
if I call (3) it loops forever in (2) trying to
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 inherits
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 (3). The
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 another
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
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:
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
which
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 .
Unless you
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. :)
Heh,
12 matches
Mail list logo