上传文件问题 [英] Upload a file question

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

问题描述

大家好。


我是PHP的新手,我试图将文件上传到服务器。


我使用表格上传pdf文件及其中的一些文本信息。


客户端上传文件,系统重命名该文件,并将所有信息放入

数据库。


问题是当客户端再次编辑信息时,我总是要选择要上传的文件,否则它会变成空白

pdf专栏并且他找不到旧版本!


i对UPDATE语句执行$ _POST [''file'']但我认为我需要做

a如果条款(并且不知道我要放什么)......但在哪里?我在UPDATE语句中尝试了它的b $ b,我不能..

Hi all.

Im a newbie in PHP and im trying to upload a file to the server.

I use a form to upload a pdf file and some text information about it.

The client uploads the file and the system renames that file and puts
all the information in the database.

The problem is when the client goes again to edit the information, i
always have to choose a file to upload or else it will put blank the
pdf column and he cant find the old one!

i do a $_POST[''file''] to the UPDATE statement but i think i need to do
a if clause(and dont know what im going to put )...but where? i tried
it in the UPDATE statement and i cant..

推荐答案

_POST [''file'']到UPDATE语句,但我想我需要做

a如果条款(并且不知道我要放什么)......但是在哪里?我在UPDATE声明中尝试过了
,我不能..
_POST[''file''] to the UPDATE statement but i think i need to do
a if clause(and dont know what im going to put )...but where? i tried
it in the UPDATE statement and i cant..


6月20日上午10:54 * am,Pépê< josemariabar。 .. @ gmail.comwrote:
On Jun 20, 10:54*am, Pépê <josemariabar...@gmail.comwrote:

大家好。


我是PHP的新手,我试图上传文件到服务器。


我使用表格上传pdf文件及其中的一些文字信息。


客户端上传文件和系统重命名该文件,并将数据库中的所有信息放入



问题是客户端再次编辑信息时,问题是/>
总是要选择要上传的文件,否则它会把

pdf列留空,他找不到旧的那个!


i做一个
Hi all.

Im a newbie in PHP and im trying to upload a file to the server.

I use a form to upload a pdf file and some text information about it.

The client uploads the file and the system renames that file and puts
all the information in the database.

The problem is when the client goes again to edit the information, i
always have to choose a file to upload or else it will put blank the
pdf column and he cant find the old one!

i do a


_POST [''file'']到UPDATE语句,但我想我需要做

a if if(并且不知道我要去的是什么)放...)但在哪里?我在UPDATE语句中尝试了

,我不能..
_POST[''file''] to the UPDATE statement but i think i need to do
a if clause(and dont know what im going to put )...but where? i tried
it in the UPDATE statement and i cant..



动态构建更新语句。这就是那种东西,

但是你应该消毒

Build your update statement dynamically. This is the sort of thing,
but you should sanitise the


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

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