时间:2021-07-01 10:21:17 帮助过:41人阅读
php
// current directory
echo getcwd() . "\n\";
chdir('public_html');
// current directory
echo getcwd() . \"\n\";
?>
输出结果为:
/home/vincent
/home/vincent/public_html
php
// current directory
echo getcwd() . "\n\";
for($i=1; $i<=2; $i++){
chdir('whoist');
// current directory
echo getcwd() . \"\n\";
}
?>