Re: Printing a root link into HTML
| From: | Gyozo Papp | Date: | Sat, 07 Jul 2001 11:34:00 +0000 |
| Subject: | Re: Printing a root link into HTML | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-56630@lists.php.net to get a copy of this message | ||
What do you mean previous directory? I guess, it may be the upper / parent directory of your script.
dirname() or realpath() returns a full path which is prepended with document_root.
I suggested to you stripping document_root from the beginning of these strings and echo it to a
link.
----- Original Message -----
From: "Chris Anderson" <chrisderson@ameritech.net>
To: "Gyozo Papp" <pgerzson@freestart.hu>; <php-general@lists.php.net>
Sent: 2001. július 7. 02:27
Subject: Re: [PHP] Printing a root link into HTML
To specify, I want to link to a file in a previous directory, none of those
methods seem to work for that.
----- Original Message -----
From: "Gyozo Papp" <pgerzson@freestart.hu>
To: "Chris Anderson" <chrisderson@ameritech.net>;
<php-general@lists.php.net>
Sent: Friday, July 06, 2001 8:17 PM
Subject: Re: [PHP] Printing a root link into HTML
Hello,
you should use full-path instead. You can easily find out what the name of
the upper directory has in PHP with using either
$HTTP_SERVER_VARS['DOCUMENT_ROOT'] or dir_name(__FILE__) or
realpath('../previous.html').
----- Original Message -----
From: "Chris Anderson" <chrisderson@ameritech.net>
To: <php-general@lists.php.net>
Sent: 2001. július 7. 01:40
Subject: [PHP] Printing a root link into HTML
I need to give a link to a file in a previous directory, but HTML doesn't
understand ../ links. Any idea how I can do this?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net