PHP 7.0 move_uploaded_file()不起作用

时间:2018-11-05 21:31:47

标签: php html vue.js

我正在使用自己的VPS服务器。我的密码在那儿。我将文件夹权限更改为777。我使用的是PHP 7.0和apache2。我尝试在安全模式下将其关闭。我在“临时”文件夹中看不到文件。它也不会移动到我指定的文件夹。我在哪里做错了?

-未知:open_basedir限制有效。文件(/ tmp)不在允许的路径内:(/ var / www /)在行0上的“未知”中,引荐网址:http://localhost:8080/

-文件上传错误-无法在第0行的“未知”中创建临时文件,引用来源:http://localhost:8080/

我是apache2的新用户

//$_FILES["UploadImage]["name"] = eg. image.png

$path = '/var/www/uploads/';

$yuklenecek_dosya = $path . basename($_FILES['UploadImage']['name']);
var_dump(move_uploaded_file($_FILES['UploadImage']['tmp_name'], $yuklenecek_dosya));
// result : bool->false

1 个答案:

答案 0 :(得分:0)

我试图简单地产生解决方案。我看到我给的许可证没有用。我分别做了以下事情。

step1 <- table_A %>% 
     left_join (table_B, by=(employee_id = unknown_id)

step2 <- step1 %>% 
     filter(is.na(department)) ***# get all the non-matching rows***

step3 <- step2 %>%
     left_join (table_B, by= (internal_id = unknown_id))

step4 <- step3 %>%
     filter(is.na(department)  ***# get all the non-matching rows again, then try other id columns if it is available***

这是工作常识。谢谢大家。