Hello!
There's a website with a following structure
index.php in the site's DocumentRoot directory (for this thread, let's
call it /www)
functions.php, init.php and db_connect.php in /www/library
index.php includes line:
include_once('library/functions.php');
functions.php includes lines:
Hi,
In order to keep configuration files outside the web root I use:
include_once('../config.php');
This used to work also when running php scripts from the command line.
Now I have a new server and I get no such file or directory when using
this construct from the command line.
I have worked
On Tuesday 08 June 2004 03:21, Mattias Thorslund wrote:
In order to keep configuration files outside the web root I use:
include_once('../config.php');
This used to work also when running php scripts from the command line.
Now I have a new server and I get no such file or directory when
Jason Wong wrote:
On Tuesday 08 June 2004 03:21, Mattias Thorslund wrote:
In order to keep configuration files outside the web root I use:
include_once('../config.php');
This used to work also when running php scripts from the command line.
Now I have a new server and I get no such file or
Mattias Thorslund wrote:
Hi,
In order to keep configuration files outside the web root I use:
include_once('../config.php');
This used to work also when running php scripts from the command line.
Now I have a new server and I get no such file or directory when using
this construct from the
Marek Kilimajer wrote:
Mattias Thorslund wrote:
Hi,
In order to keep configuration files outside the web root I use:
include_once('../config.php');
This used to work also when running php scripts from the command line.
Now I have a new server and I get no such file or directory when
using this
Marek Kilimajer wrote:
cli php uses path relative to your current directory, cgi php uses
path relative to the executing script.
That IS interesting. That would explain why:
php /var/www/myproject/util/my-cli-script.php
... will break unless I execute it from that same directory.
I used to be
On Tuesday 08 June 2004 04:14, Mattias Thorslund wrote:
What could be the difference that caused this?
As Marek had pointed out the behaviour was changed ...
Possibly:
manual Using PHP from the command line -c switch
...except I don't use the -c switch?
... IIRC just after the
Jason Wong wrote:
Possibly:
manual Using PHP from the command line -c switch
From the manual:
The CLI SAPI does not change the current directory to the directory of
the executed script!
Note: The CGI SAPI supports the CLI SAPI behaviour by means of the -C
switch when run from the command
On Tue, 2004-02-03 at 17:04, Rob wrote:
Ive programmed with C/C++ for years and have recently started to dabble in
PHP. Ive written a multi-part script for a friend and Ive run into a
problem.
snip
Heres where the problem lies. Each component is in a separate file, and when
I run the script,
Ive programmed with C/C++ for years and have recently started to dabble in
PHP. Ive written a multi-part script for a friend and Ive run into a
problem.
Ive got 14 include files 3 of which are basic components that may or may not
be used by other components. One is an authorisation class, another
My web hosting company is running php 4.0.4pl1
Why should it be that these are different
?php
global $root;
include_once(include\blah.php);
?
and
?php
global $root;
$blah=include\blah.php;
include_once($blah);
?
When I say different I mean;
1) global variable are not avaiable in the
, June 11, 2002 8:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP] include_once(blah); vs $blah=blah;
include($blah);
My web hosting company is running php 4.0.4pl1
Why should it be that these are different
?php
global $root;
include_once(include\blah.php);
?
and
?php
global $root
tly (i.e., no parens around the
include file name).
-Original Message-
From: Henry [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 8:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP] include_once(blah); vs $blah=blah;
include($blah);
My web hosting company is runn
: Re: [PHP] include_once(blah); vs $blah=blah;
include($blah);
I did as you suggest with an interesting result:
include_once blah.php;
worked
var $blah=blah.php;
include_once $blah;
gave the following error:
Parse error: parse error in including file on line
line number
Where
9:11 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] include_once(blah); vs $blah=blah;
include($blah);
I did as you suggest with an interesting result:
include_once blah.php;
worked
var $blah=blah.php;
include_once $blah;
gave the following error:
Parse error: par
comment.
-Original Message-
From: Henry [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 9:45 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] include_once(blah); vs $blah=blah;
include($blah);
No, the line number is just of the line in the
includING file of the
include_once
blah.php;
include_once $blah;
?
see if it behaves differently (i.e., no parens around the
include file name).
-Original Message-
From: Henry [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 8:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP] include_once(blah); vs $blah=blah;
inclu
Message -
From: Martin Towell [EMAIL PROTECTED]
To: 'Henry' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, June 11, 2002 4:31 PM
Subject: RE: [PHP] include_once(blah); vs $blah=blah; include($blah);
if that's a direct copy of what you've got, then the parse error's
probably
to do with the var
Hello,
I have a very long script with several functions in it. I wanted to split
the script into several files, so I created two sub-scripts and one main
script. This is the code from the main script:
?php
include_once(sub_script_1.php);
incude_once(sub_script_2.php);
$temp
script. This is the code from the main script:
?php
include_once(sub_script_1.php);
incude_once(sub_script_2.php);
$temp = MyFunction();
?
MyFunction() is contained in the file sub_script_1.php which is properly
enclosed with valid PHP start and end tags.
But When I try to run
Have you put ?php tags in your include-files?
Anders
- Ursprungligt meddelande -
Från: Mauricio Cuenca [EMAIL PROTECTED]
Till: [EMAIL PROTECTED]
Skickat: den 19 mars 2002 17:43
Ämne: [PHP] include_once()
Hello,
I have a very long script with several functions in it. I wanted
] include_once()
Have you put ?php tags in your include-files?
Anders
- Ursprungligt meddelande -
Från: Mauricio Cuenca
Till:
Skickat: den 19 mars 2002 17:43
Ämne: [PHP] include_once()
Hello,
I have a very long script with several functions in it. I wanted to
split
: Re: [PHP] include_once()
Have you remembered to set up PHP's include_path to point to the area
where
your scripts are located?
Neil
Mauricio Cuenca wrote:
Hello,
I have a very long script with several functions in it. I wanted to
split
the script into several files, so I created
has an error (dunno if this is a
php setting or it's default behaviour???)
-Original Message-
From: Mauricio Cuenca [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 20, 2002 11:14 AM
To: anders nawroth; [EMAIL PROTECTED]
Subject: Re: [PHP] include_once()
Yes,
I read the documentation
hey folks,
i'm wondering about the difference between include_once and require_once.
the manual says
The require_once() statement replaces itself with the specified file
The include_once() statement includes and evaluates the specified file
so, what is the difference? it's almost like
Redhat 6.1 Linux
PHP 4.0.4pl1
Apache 1.3.14
Anyone using "include_once"? I'm executing a PHP script "A.php"
by referring to it in my Netscape browser URL - script A.php does
an include_once of "B.php" - B.php contains a database connect
function that does a connect to an Oracle database.
I
Solved - I was changing a copy of the code that the webserver
was NOT looking at. "include_once" works fine.
Appologies.
--
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.com
Hardy Merrill [[EMAIL PROTECTED]] wrote:
Redhat 6.1 Linux
PHP 4.0.4pl1
Apache 1.3.14
28 matches
Mail list logo