|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-08-26 11:09 UTC] sniper@php.net
[2007-07-30 09:56 UTC] hans dot duedal at gmail dot com
[2007-08-20 13:38 UTC] vrana@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 20:00:01 2025 UTC |
Description: ------------ cwd is set to server root (i guess) instead of called php file's directory in __destruct() it probably isn't server root (see results), because that would be /www on linux - on windows it is Reproduce code: --------------- <?php class Foo { public function bar() { echo getcwd() . "\n"; } public function __destruct() { $this->bar(); } } $f = new Foo(); $f->bar(); ?> Expected result: ---------------- Windows XP: F:\htdocs F:\htdocs My webhoster's linux: /www/htdocs/[some number] /www/htdocs/[some number] (or whatever directory the file is in) Actual result: -------------- Windows XP: F:\htdocs D:\Apache\Apache 2 My webhoster's linux: /www/htdocs/[some number] /