Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/239.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用登录用户更改upload.php路径?_Php - Fatal编程技术网

如何使用登录用户更改upload.php路径?

如何使用登录用户更改upload.php路径?,php,Php,我想用登录用户名更改上传路径(corrent:uploads)。您尝试过类似的方法吗 $upload_path = **'./uploads'/**; // The place the files will be uploaded to 我不太明白你的问题,但这里有一个例子 $user = "admin"; //or whatever $upload_path = "/uploads/" . $user; $upload_path='./users/'.$会话['user_name'.

我想用登录用户名更改上传路径(corrent:uploads)。

您尝试过类似的方法吗

  $upload_path = **'./uploads'/**; // The place the files will be uploaded to 

我不太明白你的问题,但这里有一个例子

$user = "admin"; //or whatever
$upload_path = "/uploads/" . $user;

$upload_path='./users/'.$会话['user_name'./'$上传路径='./用户/'.$会话['user\u name'./';
$upload_path = './' . ($logged_in ? $username : 'uploads') . '/';