|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-06-30 22:56 UTC] ohill@php.net
Description: ------------ The content of the __FILE__ constant is relative while running through a Virtual Host on OS X. The bug is not seen while working with the CLI version or if the script is not in a VirtualHost directive. Configure is as follow (majorly taken from OS X compile flags): './configure' '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-apxs' '--enable-cli' '--with-zlib' '--with-xml' '--enable-exif' '--enable-ftp' '--enable-sockets' '--with-curl=/usr' '--with-config-file-path=/etc' '--sysconfdir=/private/etc' Apache is the one distributed with Tiger 10.4.1 (1.3.33). The same code runs fine on Linux and Windows with the same config (vhosts settings). Reproduce code: --------------- <?php print __FILE__; PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 16:00:01 2025 UTC |
If you try with 2 scripts: /index.php /something/index.php and /index.php contains print __FILE__ and /something/index.php contains include('../index.php'), if you point your browser to /index.php the content of __FILE__ is correct. If you try /something/index.php, __FILE__ will contains '../index.php'