|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests |
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 03:00:01 2025 UTC |
Description: ------------ Most people are using forward slashs, even on Windows. But there is a problem with symlink(). As you can see in the example, the symlink is created as given in the code. Of course, many programs can't work with slashs, e.g. cmd.exe internal functions. The symlink data it read by programs "as is", in this case "./foo.php". And a "/" is not working in cmd.exe (or other programs). Thus it would be nice, if symlink() on Windows is changing "/" itself to "\". Test script: --------------- In the shell: php -r "symlink('./foo.php', 'bar.php');" dir bar.php type bar.php Expected result: ---------------- 28.02.2011 17:49 <SYMLINK> bar.php [.\test.php] Content of test.php Actual result: -------------- 28.02.2011 17:49 <SYMLINK> bar.php [./test.php] File not found.