Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人能告诉我这段代码有什么问题吗?
<?php $user = $fgmembersite->UserFullName(); $handle = opendir('/users/$user/'); ?>
这是错误消息:
opendir(/app/$user/) [function.opendir]: failed to open dir: No such file or directory in
双引号来评估变量
$handle = opendir("/users/$user/");
PHP中单引号和双引号字符串有什么区别?
在单引号中 $user 不会被解释为变量 - 在双引号中它将被尝试 opedir("/users/$user")
试试这个: