写上传附件的语句,都是对的!就是不显示,上传不了。
原因是= = 坑爹的!前端要写一个参数来接收!
在from表单里加这样的一句 <form action="" method="post" id="myform" name="myform" enctype="multipart/form-data">
就可以成功上传了!
在TP框架里:
$upload->savePath = './Public/Uploads/'; // 设置附件上传目录
$upload->rootPath = './'; //这句最好加上,手册是不带这一句的。理由的话,你不加这条语句试试- -。
Tags: None
Archives QR Code
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有