note 127925 added to function.phpinfo
| From: | kong0107+php at gmail dot com | Date: | Mon, 14 Nov 2022 05:26:02 +0000 |
| Subject: | note 127925 added to function.phpinfo | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-219880@lists.php.net to get a copy of this message | ||
Even handling text with leading slash '/',
in Windows the root dir (without sub dir and filename) would be backslash '\'
<?php
// All the following three returns '/foo'
pathinfo('/foo/bar')['dirname'];
pathinfo('/foo/bar', PATHINFO_DIRNAME);
dirname('/foo/bar');
// All the following three returns '\\' in Windows
pathinfo('/foo')['dirname'];
pathinfo('/foo', PATHINFO_DIRNAME);
dirname('/foo');
?>
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.159.161 (proxied: 103.224.200.49)
----
Manual Page -- https://php.net/manual/en/function.phpinfo.php
Edit -- https://main.php.net/note/edit/127925
Del: integrated -- https://main.php.net/note/delete/127925/integrated
Del: useless -- https://main.php.net/note/delete/127925/useless
Del: bad code -- https://main.php.net/note/delete/127925/bad+code
Del: spam -- https://main.php.net/note/delete/127925/spam
Del: non-english -- https://main.php.net/note/delete/127925/non-english
Del: in docs -- https://main.php.net/note/delete/127925/in+docs
Del: other reasons-- https://main.php.net/note/delete/127925
Reject -- https://main.php.net/note/reject/127925
Search -- https://main.php.net/manage/user-notes.php