Hello Andrew,

Sorry, but i forget what I have Zend Debuger :)

Problem in file path, when i use absolute path
/home/user/tmp/tmp/text.txt all works.

It appears, that in shutdown_function getcwd () == '/',
but in script getcwd () == '/home/user/public_html/'

Only not clearly why.


AS> Hello php-general,

AS>  Why this not working (php.4.0.4pl1_Linux)?
 
AS> <?
AS>  error_reporting(E_ALL);

AS>  $file_name = '../tmp/text.txt';

AS>  function funct1(){
AS>    global $file_name;
AS>    if ($fd = fopen($file_name,'a+')){
AS>      fwrite($fd,"Funct1\n");
AS>      fclose($fd);
AS>    }else{
AS>      die("Can not open output file");
AS>    }
AS>  }

AS>  function funct2(){
AS>    global $file_name;
AS>    if ($fd = fopen($file_name,'a+')){
AS>      fwrite($fd,"Funct2\n");
AS>      fclose($fd);
AS>    }
AS>  }

AS>  $i = register_shutdown_function('funct2');
AS>  funct1();
?>>

AS> file have only  "Funct1" ?

AS> Best regards,
AS>  Andrew Sitnikov                         
AS>  e-mail : [EMAIL PROTECTED]
AS>  GSM: (+372) 56491109






Best regards,
 Andrew Sitnikov                         
 e-mail : [EMAIL PROTECTED]
 GSM    : (+372) 56491109



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to