ID:               35661
 Updated by:       [EMAIL PROTECTED]
 Reported By:      marscel at pcreact dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         Directory function related
 Operating System: Windows XP SP1
 PHP Version:      5.1.1
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------

[2005-12-13 19:46:33] marscel at pcreact dot de

Description:
------------
I have a member function which is been called in the destructor of this
object. The called function has to write a string into a file, which
shall be stored in a subdirectory. 
In my case its F:\php\logs (php is the dir where the script is stored,
in the \logs dir shall the created file be stored). The first problem I
recognized was that PHP can't read the current directory in the
function, the second one is that it creates files in a totally
different directory. If I tell this function "mkdir("./logs/");", it
won't create a subdir called "logs" in F:\php, but in D:\ (-> D:\logs)!

If I write the absolute directory, the thing works, but it's useless on
a webspace.
My php.ini hasn't set anything to D:\ just PHP is installed in D:\php\

Reproduce code:
---------------
class someclass
{   // Constructors, functions, vars...
    public function someclass_make_file($mode)    {
        if(defined('DEBUG_LOG')) { 
                        switch($mode)  { 
                                case 3:
          $dl = $this->debug_log;  // "Info"
          $dfl = fopen("logs/".time().".txt", "a");
        fwrite($dfl, $dl);
          fclose($dfl); 
          break;
                        }
                }
                return true;
    }
    public funtion __construct()
    {
       $this->someclass_make_file(3)
    }
}


Expected result:
----------------
A file F:\php\logs\1134123412.txt

Actual result:
--------------
A file D:\logs\1134123412.txt or non has been created.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35661&edit=1

Reply via email to