PHP - UPLOAD_ERR_NO_TMP_DIR [英] PHP - UPLOAD_ERR_NO_TMP_DIR

查看:251
本文介绍了PHP - UPLOAD_ERR_NO_TMP_DIR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Cbeyond(www.cbeyond.com,有些人可能熟悉它们)作为PHP Enabled网络主机,当我检查如下时,我遇到了PHP上传功能的问题:

  $ 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆