class a
{
public function f(&$ref1, &$ref2)
{
$ref1 = 'foo';
$ref2 = 'bar';
}
}
class b
{
public function __call($methodName, $arguments)
{
$a = new a();
call_user_func_array(array(
$a, $methodName
), $a
我试图编写一个脚本来检查某个特定目录是否存在于当前通过PHP登录的用户主目录中。
当我在终点站使用
cd ~
pwd
它显示了/home/ramratan。
但是,当我尝试通过PHP时,如下所示
chdir("~");
PHP Warning: chdir(): No such file or directory (errno 2)
in php shell code on line 1
PHP Stack trace:
PHP 1. {main}() php shell code:0
PHP 2. c