|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-08-24 14:48 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
Description: ------------ Sorry for my English, i'm from Russia in __destruct(): 1) PHP is CGI - all ok 2) PHP as Apache Module - Document Root = Server Root and i can't get access to my files: file(), dir(), fopen() doesn't work ("failed to open stream: No such file or directory in...") Reproduce code: --------------- function listdir($msg){ print "<hr><b>$msg</b><hr><pre>"; print realpath(".")."\r\n</pre>"; } class A{ function __construct() {listdir("__construct");} function __destruct() {listdir("__destruct"); } function f() {listdir("f()"); } } $a=new A(); $a->f(); Expected result: ---------------- -------------------- __construct -------------------- C:\hosts\web2.ru -------------------- f() -------------------- C:\hosts\web2.ru -------------------- __destruct -------------------- C:\hosts\web2.ru Actual result: -------------- -------------------- __construct -------------------- C:\hosts\web2.ru -------------------- f() -------------------- C:\hosts\web2.ru -------------------- __destruct -------------------- C:\Apache\Apache2