|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-09-27 13:49 UTC] k dot bizuns at inbox dot lv
Description: ------------ <?php echo realpath( './' ) ; ?> This code in PHP 5.2.4 gives an output with trailing slash (example: C:\www\) PHP 5.2.3 not (example: C:\www). Who is right? Tested on WinXP. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 29 08:00:01 2025 UTC |
Does it really make sense that this function behaves so inconsistently about its trailing slashes between Linux and Win?: LINUX (tested with PHP 5.2.11): --- realpath('.') : string = "/myhttpdfolder" realpath('./') : string = "/myhttpdfolder" realpath('fileadmin') : string = "/myhttpdfolder/fileadmin" realpath('fileadmin/') : string = "/myhttpdfolder/fileadmin" WINDOWS (tested with PHP 5.2.5): --- realpath('.') : string = "C:\\myhttpdfolder" realpath('./') : string = "C:\\myhttpdfolder\\" realpath('fileadmin') : string = "C:\\myhttpdfolder\\fileadmin" realpath('fileadmin/') : string = "C:\\myhttpdfolder\\fileadmin\\"