Reading and Changing the Working Directory : getcwd « File Directory « PHP






Reading and Changing the Working Directory

 
<?
    $original_dir = getcwd( );

    chdir("/etc");


    $passwd = fopen("passwd", "r");

    fclose($passwd);
    chdir($original_dir);
?>
  
  








Related examples in the same category