|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-11-14 04:27 UTC] d dot roche at lectra dot com
try this little script :
<script language="php">
chdir("/tmp");
@unlink("/tmp/foo2.txt");
symlink("../foo.txt", "/tmp/foo2.txt");
</script>
it create on /tmp the following link :
foo2.txt -> /foo.txt
while it should have created ( as previous versions does )
foo2.txt -> ../foo.txt
looks like relative path are resolved before making the link
thus it is no longer possible to create relative links !
my configure line is :
./configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --with-config-file-path=/etc --enable-force-cgi-redirect --disable-debug --enable-pic --disable-rpath --enable-inline-optimization --with-bz2 --with-db3 --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --with-gd --enable-gd-native-ttf --with-ttf --with-gdbm --with-gettext --with-jpeg-dir=/usr --with-openssl --with-png --with-regex=system --with-xml --with-zlib --with-layout=GNU --enable-debugger --enable-ftp --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable-discard-path --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --with-oci8=shared --with-oracle=shared --with-imap=shared --with-imap-ssl --with-kerberos=/usr/kerberos --with-ldap=shared --with-mysql=shared,/usr --enable-shmop --enable-versioning --enable-calendar --enable-dbx --enable-dio --enable-mcal --enable-mbstring --enable-mbstr-enc-trans --with-apxs=/usr/sbin/apxs
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 19:00:01 2025 UTC |
You are wrong. Ex: cd /tmp; echo "TEST DATA" > /my/home/file.txt; ln -s ../my/home/file.txt test_link.txt; ls -lia test_link.txt; { test_link -> ../my/home/file.txt } cd /some/dir; cat /tmp/test_link; { TEST DATA }> ln -s ../my/home/file.txt test_link.txt; > ls -lia test_link.txt; > { test_link -> ../my/home/file.txt } what you say is right , but IT IS NOT POSSIBLE to create such a link with the last PHP version in your example , the link created by php will be : test_link -> /my/home/file.txt i do not want the ../ to disapear even if it points to the same location ! what i say is not that the link is broken, but the link is no longer relative, i can not move it , or i cannot create it from anywhere !