2011-03-12 75 views
-2

我有下面的代码应的index.php文件复制到该目录PHP目录路径使用变量

$path="/data/www/vhosts/themacsplash.com/httpdocs/ClipBoy/userfiles/"; 
$fpath="/data/www/vhosts/themacsplash.com/httpdocs/ClipBoy/userfiles/index.php"; 
$myFolder = $path . $myUser; 
$myFolderP = &myFolder."/"."index.php"; 

我需要$myFolderP设置为$myFolder/index.php所以如:

/data/www/vhosts/themacsplash.com/httpdocs/ClipBoy/userfiles/will/index.php 

如何我会这样做吗?我目前的代码为$myFolderP给我的错误:

Parse error: syntax error, unexpected '.', expecting T_PAAMAYIM_NEKUDOTAYIM in /data/www/vhosts/themacsplash.com/httpdocs/ClipBoy/code/index.php on line 94

我敢肯定这是一个简单的修复。

+0

究竟是什么,让该错误的行? – 2011-03-12 19:24:13

回答

5

你必须写下这个

$myFolderP = $myFolder."/"."index.php"; 

取而代之的是

$myFolderP = &myFolder."/"."index.php";