Richard Heyes wrote:
i need a way to get the path to the parent folder of the folder i am
in. one "dirty" way i found is this -
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR .
".." . DIRECTORY_SEPARATOR .
"config.php");
i can also explode() and rea
Jim Lucas wrote:
> Iv Ray wrote:
>> Jim Lucas wrote:
> So, saying that it is outside the source does not tell me if it is
> outside the document root.
A, right.
It is outside the document root.
> Use your include_path php_ini setting
A, right...
Didn't think of it.
Actually, I do not like th
i need a way to get the path to the parent folder of the folder i am in.
one "dirty" way i found is this -
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR .
".." . DIRECTORY_SEPARATOR .
"config.php");
i can also explode() and reassemble all folders
Iv Ray wrote:
Jim Lucas wrote:
Iv,
tell me why you are wanting to do this?
If it is the reason I think it is, I can give you a better way to
accomplish this.
I have the source and a configuration file, which I want outside the
source - it is different from server to server.
The easiest i
Jim Lucas wrote:
Iv,
tell me why you are wanting to do this?
If it is the reason I think it is, I can give you a better way to
accomplish this.
I have the source and a configuration file, which I want outside the
source - it is different from server to server.
The easiest is to have the c
Stut wrote:
$path = dirname(dirname(__FILE__));
That will get you the parent directory.
-Stut
A,... right! - me and my limited thinking... - dirname() gives the
parent of a file AND of a directory, right.
Thanks,
Iv
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Stut wrote:
On 18 Jun 2008, at 13:57, Iv Ray wrote:
James Dempster wrote:
> Personally I use.
>
>
> I think it's what most people do.
A... very interesting, thanks.
To get the path only I did this -
$path = dirname(__FILE__);
$parts= explode(DIRECTORY_SEPARATOR, $path);
arra
On 18 Jun 2008, at 13:57, Iv Ray wrote:
James Dempster wrote:
> Personally I use.
>
>
> I think it's what most people do.
A... very interesting, thanks.
To get the path only I did this -
$path = dirname(__FILE__);
$parts= explode(DIRECTORY_SEPARATOR, $path);
array_pop($parts)
James Dempster wrote:
> Personally I use.
>
>
> I think it's what most people do.
A... very interesting, thanks.
To get the path only I did this -
$path = dirname(__FILE__);
$parts= explode(DIRECTORY_SEPARATOR, $path);
array_pop($parts);
$INSTALL_PATH = implode(DIRECTORY_SEPA
Personally I use.
wrote:
> hi all,
>
> i need a way to get the path to the parent folder of the folder i am in.
> one "dirty" way i found is this -
>
> require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR .
> ".." . DIRECTORY_SEPARATOR .
> "config.php");
>
>
10 matches
Mail list logo