(PHP 4, PHP 5)
getcwd — 取得当前工作目录
取得当前工作目录。
成功则返回当前工作目录,失败返回 FALSE 。
在某些 Unix 的变种下,如果任何父目录没有设定可读或搜索模式,即使当前目录设定了, getcwd() 还是会返回 FALSE 。有关模式与权限的更多信息见 chmod()。
Example#1 getcwd() 例子
<?php
// current directory
echo getcwd () . "\n" ;
chdir ( 'cvs' );
// current directory
echo getcwd () . "\n" ;
?> 上例的输出类似于:
/home/didou /home/didou/cvs
© 2005-2008 BlaBla.cn 版权所有