PHP - UPLOAD_ERR_NO_TMP_DIR [英] PHP - UPLOAD_ERR_NO_TMP_DIR
问题描述
$ error = $ _FILES ['uploadedfile'] ['error'];
echo $ error;
我得到6,错误信息为:UPLOAD_ERR_NO_TMP_DIR
我的根目录下有一个/ tmp目录,这里是文件结构:
/< ; --- ftp root(包含working / tmp)
/ www / htdocs /< - webroot
我试过创建:
$ p $ / www / htdocs / tmp(没有运气)
有没有办法创建一个tmp位置,我只需要解析一个上传的.txt文件到我的MySQL DB。
您可能需要检查CBeyond是否允许文件上传。如果是这样,请检查他们的php.ini文件上传部分是否正确定义了 upload_tmp_dir
。
I am using Cbeyond (www.cbeyond.com, some of you might be familiar with them) as a PHP Enabled webhost, I'm having issues with my PHP Upload functions, when I check as follows:
$error = $_FILES['uploadedfile']['error'];
echo $error;
I get "6", for the error message: "UPLOAD_ERR_NO_TMP_DIR"
I have a /tmp directory at my root, here is the file structure:
/ <--- ftp root (contains a working /tmp)
/www/htdocs/ <-- webroot
I've tried creating:
/www/htdocs/tmp (no luck)
Is there anyway to create a tmp location on the fly, I just need to parse an uploaded .txt file into my MySQL DB.
You probably need to check with CBeyond whether they allow file uploading or not. If so, check with them whether their php.ini File Uploads section has upload_tmp_dir
properly defined.
这篇关于PHP - UPLOAD_ERR_NO_TMP_DIR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!