使用php设置文件上传 [英] Setting up file uploads with php

查看:53
本文介绍了使用php设置文件上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Heya们,我有这个简单的脚本工作,现在它没有。它远没有完成,我知道,我只是想它gogogo所以我可以扩展它包括我的喜好和一些隐藏的领域。

我无法判断我是否搞砸了代码或与服务器相关的问题。这里去....


Heya guys, i got this simple script to work and now it doesnt.Its far from completed, i know, i just want it to gogogo so i can expand it to include my preferences and a few hidden fields.
I can''t tell if i screwed up the code or its a server related problem. here goes....


展开 | 选择 | Wrap | 行号

推荐答案

[PHP]


uploaddir =" / var / www / html / gallery" ;; [/ PHP]

删除" /"从路径的开头并放一个/到最后检查一下。

[PHP]
uploaddir = "/var/www/html/gallery"; [/PHP]
remove "/" from the beginning of the path and put a "/" to the end check it.
[PHP]


uploaddir =" var / www / html / gallery /" ;; [/ PHP]


如果您的文件与图库文件夹一起列出{所有都在同一个DIR},这也很有效。

但请确保为其远程服务器分配写入权限。


[PHP]
uploaddir = "var/www/html/gallery/"; [/PHP]

if your files are listed with gallery folder {all are in same DIR} simply this also work.
but make sure to assign the write permission to the folder if its remote server.

[PHP]


这篇关于使用php设置文件上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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