admin管理员组文章数量:1516870
php图片怎么存入指定文件夹
$file_dir = "your dir"; //用你的上传目录代替
$tmep_cfile1 = "goods_file".$i;
$temp_cf = "goods_file".$i;
$temp_cn = "goods_file".$i."_name";
$temp_cs = "goods_file".$i."_size";
$temp_ct = "goods_file".$i."_type";
$temp_cx = "goods_file".$i."_text";
$temp_cd = "goods_file".$i."_del";
if($_FILES[$tmep_cfile1]) {
$$temp_cf = $_FILES[$tmep_cfile1][tmp_name];
$$temp_cn = $_FILES[$tmep_cfile1][name];
$$temp_cs = $_FILES[$tmep_cfile1][size];
$$temp_ct = $_FILES[$tmep_cfile1][type];
}
if($$temp_cs > 0) {
if($$temp_cx) {
file_unlink(".{$$temp_cx}");
}
$$temp_cf = upload_file($$temp_cf, $$temp_cn, $$temp_cs, $file_dir, $g_file_okext, $g_max_file_size);
}
elseif($$temp_cd) {
if($$temp_cx) {
file_unlink(".{$$temp_cx}");
}
$$temp_cx = "";
}
写入数据库就是把那些文件名,路径,大小,类型之类的写入吧。没什么可说的了。
作者: 大宝
发布时间: 2008-03-02
本文标签: php图片怎么存入指定文件夹
版权声明:本文标题:php图片怎么存入指定文件夹 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.betaflare.com/biancheng/1707351439a720211.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论