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 ...
随机推荐
- Angularjs实例2
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content=&q ...
- 在cengos中安装zabbix server/agent, 并创建一个简单demo
添加zabbix更新源 rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch ...
- js关于密码框强弱度的提示
三种密码强度的正则表达式: 较弱:全是数字或全是字母 6-16个字符:/^[0-9]{6,16}$|^[a-zA-Z]{6,16}$/; 中级:数字.26个英文字母 6-16个字符: /^[A-Za- ...
- linux网络相关配制及命令
1.虚拟机配制 查看ip: ip addr 配制网卡(读者可以忽略): 编辑虚拟网络编辑器,修改子网IP 查看ip,输入ip addr 开启网络:ifup eth0 关闭网络:ifdown eth0 ...
- SpringBoot非官方教程 | 第二十一篇: springboot集成JMS
转载请标明出处: http://blog.csdn.net/forezp/article/details/71024024 本文出自方志朋的博客 springboot对JMS提供了很好的支持,对其做了 ...
- CRS
CRS是集群就绪服务(cluster ready service)的简称,主要负责集群中的资源管理以及OCR管理.为了与10gR2集群管理软件名称crs区分,这里用CRSD代替CRS.相关概念:--资 ...
- 怎样在Swift中使用CocoaPods
怎样在Swift中使用CocoaPods 它不是神秘的亚马逊区域的部落人用手捡出来的生可可的豆荚,肯定不是!让CocoaPods website来回答可能是最好的: CocoaPods是Cocoa项目 ...
- Vue--- VueX基础 (Vuex结构图数据流向)1.1
Vuex基础 https://vuex.vuejs.org/zh-cn state --> view --> action -> state 多组件共享状态, 之前操作方式,由父组件 ...
- FastJson反序列化漏洞利用的三个细节 - TemplatesImpl的利用链
0. 前言 记录在FastJson反序列化RCE漏洞分析和利用时的一些细节问题. 1. TemplatesImpl的利用链 关于 parse 和 parseObject FastJson中的 pars ...
- Git详解及github的使用
1.Devops介绍 1.Devops是什么 开发 development 运维 operations 2.Devops能干嘛 提高产品质量 1 自动化测试 2 持续集成 3 代码质量管理工具 4 程 ...