无法将用户文件发送到wordpress上的php脚本
在主页上,我接受了一个文件输入,即无法将用户文件发送到wordpress上的php脚本,php,wordpress,Php,Wordpress,在主页上,我接受了一个文件输入,即 form action = "Results" method = "post" input type = "file" name="file_name" input type = "submit" value="Upload" /form 在结果页面上,我编写了一个php代码来读取其内容 ?php $file = $_POST["file_name"]; $fp = fopen($file, 'r'); if($fp == NULL){
form action = "Results" method = "post"
input type = "file" name="file_name"
input type = "submit" value="Upload"
/form
在结果页面上,我编写了一个php代码来读取其内容
?php
$file = $_POST["file_name"];
$fp = fopen($file, 'r');
if($fp == NULL){
echo '<h2> File not found !!!</h2>';
}
else {
$line = fread($fp,filesize($file));
...
}
fclose($fp);
?
我已经在我的网站上安装了exec php插件,但我无法找出错误。听起来像
1) No any file was uploaded to the temp directory
2) You have to check the upload_max_filesize of your server. (run phpinfo() and check)
3) Just `print_r($_FILE)` to check what is the error?
1) No any file was uploaded to the temp directory
2) You have to check the upload_max_filesize of your server. (run phpinfo() and check)
3) Just `print_r($_FILE)` to check what is the error?