ID:               36529
 Updated by:       [EMAIL PROTECTED]
 Reported By:      lunter at interia dot pl
-Status:           Open
+Status:           Bogus
 Bug Type:         Output Control
 Operating System: winXP
 PHP Version:      5.1.2
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

CWD changes back to server root at shutdown.



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

[2006-02-25 20:41:33] lunter at interia dot pl

Description:
------------
One script but two value from getcwd()

Reproduce code:
---------------
Note that both script are placed in dir:
C:\Apache2\htdocs\script

// index1.php (script with bug):
<?
 function a($i){
  $i.='func getcwd(): '.getcwd();
  return($i);
 }
 ob_start('a');
 print('main getcwd(): '.getcwd().'<br>');
?>

// index2.php (to clarificate):
<?
 function a($i){
  print('func getcwd(): '.getcwd());
  return($i);
 }

 print('main getcwd(): '.getcwd().'<br>');

 $a=array('');
 $a=array_map('a',$a);
?>

Expected result:
----------------
// index1.php return:
main getcwd(): C:\Apache2\htdocs\script
func getcwd(): C:\Apache2\htdocs\script

// index2.php return:
main getcwd(): C:\Apache2\htdocs\script
func getcwd(): C:\Apache2\htdocs\script

Actual result:
--------------
// index1.php return:
main getcwd(): C:\Apache2\htdocs\script
func getcwd(): C:\Apache2

// index2.php return:
main getcwd(): C:\Apache2\htdocs\script
func getcwd(): C:\Apache2\htdocs\script


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


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

Reply via email to