note 126721 added to function.getcwd
| From: | Anonymous at main dot php dot net | Date: | Tue, 28 Dec 2021 18:36:04 +0000 |
| Subject: | note 126721 added to function.getcwd | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-217430@lists.php.net to get a copy of this message | ||
given a link
/some/link->/some/location/path
with linux bash,
if within the linked drawer /some/link
cd .. goes upper link /some/
cd -P .. goes upper destination /some/location/
with php
fopen ("../file") goes upper destination /some/location/file
some others commented about ways obtaining the path below.
I found some luck with using $_SERVER['DOCUMENT_ROOT'] instead
to recraft an absolute path.
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.135 (proxied: 83.192.202.110)
----
Manual Page -- https://php.net/manual/en/function.getcwd.php
Edit -- https://main.php.net/note/edit/126721
Del: integrated -- https://main.php.net/note/delete/126721/integrated
Del: useless -- https://main.php.net/note/delete/126721/useless
Del: bad code -- https://main.php.net/note/delete/126721/bad+code
Del: spam -- https://main.php.net/note/delete/126721/spam
Del: non-english -- https://main.php.net/note/delete/126721/non-english
Del: in docs -- https://main.php.net/note/delete/126721/in+docs
Del: other reasons-- https://main.php.net/note/delete/126721
Reject -- https://main.php.net/note/reject/126721
Search -- https://main.php.net/manage/user-notes.php