Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.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
无法将用户文件发送到wordpress上的php脚本_Php_Wordpress - Fatal编程技术网

无法将用户文件发送到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?