PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0
代码在本地运行一切都OK,放到服务器上,网站访问正常,上传就出现该错误。
提示:PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0
出现问题的服务器:Windows server 2012 Standard
iis8 php5.5.37 fastCGI

原因:原来是在配置php环境的时候,php.ini没有设置upload_tmp_dir 。
如果 php.ini 没有设置 upload_tmp_dir,那么默认 php 进程会读写系统的临时目录(Windows 默认为 C:/windows/temp,Linux 为 /tmp),所以为了保险起见还是设置下这个值。
解决:将upload_tmp_dir 的路径制定到项目中存放上传文件的文件夹中。
PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0的更多相关文章
- Warning: File upload error - unable to create a temporary file in Unknown on line 0
upload_tmp_dir 临时文件夹问题 上传文件提示 Warning: File upload error - unable to create a temporary file in Unkn ...
- File upload error - unable to create a temporary file
php上传图片的时候会报错: File upload error - unable to create a temporary file 文件上传错误 - 无法创建一个临时文件 你只需要打开你的php ...
- php5.6 上传图片error代码为6 或者 报错“PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0”的解决办法
问题:再利用webuploader上传图片的时候发现,报错,打印了$_FILES["file"]["error"] 发现是6,找不到临时文件夹: $_FILES ...
- 两种解决方法 PHP Warning: File upload error - unable to create a temporary file in Unknown
原因:上传文件时,没有管理员权限的你不能读取临时文件夹; 解决方法(两种)找到临时文件夹并给当前访问用户所有权限; 方法一: 找到Apache默认的临时文件,步骤如下: 1.找到临时文件夹,一般在C: ...
- Git error: unable to create file xxx: Filename too long
一.问题描述 在使用 git 时,提示 error: unable to create file xxx: Filename too long error: unable to create file ...
- SonarQube执行代码分析时,报错ERROR: Unable to create symbol table for : /**/*.java java.lang.IllegalArgumentException: Unsupported class file major version 55
若要转载本文,请务必声明出处:https://www.cnblogs.com/zhongyuanzhao000/p/11686633.html 起因: 最近正在尝试SonarQube的简单使用,但是当 ...
- git error: unable to create file Invalid argument
git error: unable to create file xxxx Invalid argument 原因: mac 上创建的文件名里有冒号,这在windows 上是不允许的. 解决方式: ...
- sqlplus链接数据库报ORA-09925: Unable to create audit trail file
[localhost.localdomain]:[/oracle11/app/oracle11/product/11.2.0/dbhome_1/dbs]$ sqlplus / as sysdba SQ ...
- ORA-09925: Unable to create audit trail file带来的sqlplus / as sysdba无法连接
SQL> show parameter pfile; /picclife/app/oracle/product/11.2.0/dbhome_1/dbs/spfilehukou.ora SQL&g ...
随机推荐
- 使用redux代码文件的组织方式
从架构触发,开始一个新应用的时候,代码文件的组织方式一定要考虑好 如果之前使用过mvc的框架那么对按角色组织方式一定不陌生 角色组织方式 reducer/ todoReducer.js filterR ...
- 使用RMAN对数据文件进行恢复
(1)备份数据库 在使用RMAN进行数据库恢复之前,先用RMAN进行全库备份 [oracle@redhat6 ~]$ rman target / Recovery Manager: Release : ...
- Web中的中文参数乱码
中文参数乱码 1 get方式传参,中文乱码 修改tomcat中的配置server.xml 在修改端口的标签中添加属性URIEncoding="XXX&quo ...
- Oracle数据库大量library cache: mutex X及latch: shared pool问题排查一例
业务系统数据库夯住,数据库内大量的library cache: mutex X及latch: shared pool等待,alert日志信息如下 Tue Sep :: WARNING: inbound ...
- 分布式id生成
2016年08月09日 14:15:21 yuanyuanispeak 阅读数:318 编辑 一.需求缘起 几乎所有的业务系统,都有生成一个记录标识的需求,例如: (1)消息标识:message-id ...
- zepto 基础知识(2)
20.append append(content) 类型:self 在每个匹配的元素末尾插入内容(内部插入).内容可以为html 字符串.dom节点,或者节点组成的数组. $('ul').append ...
- #leetcode刷题之路3-无重复字符的最长子串
给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度. 示例 1:输入: "abcabcbb"输出: 3 解释: 因为无重复字符的最长子串是 "abc" ...
- 用HANA STADIO 开发ABAP程序
Help-->Install New Software-->ADD NAME: hana_on_mars Location: https://tools.hana.ondemand.com ...
- solr索引大小对比
原文本 Solr建立的索引 如果进行Mysql索引应该是1:3的比例
- linux命令之磁盘和文件系统操作
1. fdisk:磁盘分区命令 语法:fdisk [选项][参数] 命令说明:fdisk是linux系统里常用的一种磁盘管理工具,可以创建和管理系统分区 常用命令选项: -l:列出指定的并退出,没 ...