上传.php:
这是表格(在一个单独的文件中):
错误是
($Filename=$_POST['Filename'];)
和
(echo "The file ".basename( $_FILES['uploadedfile']['Filename'])." 已上传,并且您的信息已添加到目录中";)
给我:
首先你应该使用 print_r($_FILES) 来调试,看看它包含什么.:
您的 uploads.php 看起来像:
由于这是旧帖子,目前强烈建议使用 mysqli 或 pdo 代替php中的mysql_函数
Upload.php:
And here is the form(in a separate file):
The errors are
(the $Filename=$_POST['Filename'];)
and
(the echo "The file ". basename( $_FILES['uploadedfile']['Filename']). " has been uploaded, and your information has been added to the directory";)
gives me:
First you should use print_r($_FILES) to debug, and see what it contains. :
your uploads.php would look like:
EDIT: Since this is old post, currently it is strongly recommended to use either mysqli or pdo instead mysql_ functions in php
更多推荐
使用PHP上传文件并添加MySQL数据库路径
>www.elefans.com
编程频道|电子爱好者 - 技术资讯及电子产品介绍!
发布评论