上个帖子 无法上传啊 PHP Warning: move_uploaded_file(./swf/360.swf) [function.move-uploaded-file]: failed to open stream: No such file or directory in D:\www\Nw.php on line 8 PHP Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\WINDOWS\Temp\phpAE7.tmp' to './swf/360.swf' in D:\www\Nw.php on line 8 错误代码!求教啊!
上个帖子 无法上传啊 PHP Warning: move_uploaded_file(./swf/360.swf) [function.move-uploaded-file]: failed to open stream: No such file or directory in D:\www\Nw.php on line 8 PHP Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\WINDOWS\Temp\phpAE7.tmp' to './swf/360.swf' in D:\www\Nw.php on line 8 错误代码!求教啊!
move失败,查看目录是否正确。
路径可以用系统系统根目录+相对路径的方法
$_SERVER["DOCUMENT_ROOT]."./swf/360.swf";
swf目录是相对于代码的目录下的子目录
$uploaddir = './swf/'; //在你当前文件目录下创建swf目录
$uploadfile = $uploaddir.$_FILES['file']['name'];
if(move_uploaded_file($_FILES['file']['tmp_name'],$uploadfile))
<tr>
<td class="row1">360全景:</td>
<td><span class="tip"> 小于5000K</span><br />
<iframe name="uploadHousePicture" width="100%" height="35" scrolling="No" frameborder="no" src="<!--{$cfg.url}-->upload.php?to=uploadHousePicture|house|360" align="left"></iframe>
</td>
</tr>
<tr>
<td colspan="2">
<div id="house_picture_dis">
<!--{foreach name=house_pic from=$dataInfo.house_pic item=item key=key}-->
<div class="upload_shower" id="container_picture_<!--{$smarty.foreach.house_pic.index}-->">
<a href="<!--{$cfg.url}-->upfile/<!--{$item.pic_url}-->"><img src="<!--{$cfg.url}-->upfile/<!--{$item.pic_url}-->" width="160" height="120"></a>
<br/><input type="text" name="house_picture_desc[]" value="<!--{$item.pic_desc}-->" size="12">
<input type="hidden" name="house_picture_url[]" value="<!--{$item.pic_url}-->">
<input type="hidden" name="house_picture_thumb[]" value="<!--{$item.pic_thumb}-->">
<input type="button" name="deletePicture_<!--{$smarty.foreach.house_pic.index}-->" onclick="dropContainer('container_picture_<!--{$smarty.foreach.house_pic.index}-->')" value="删">
</div>但是这段找不到写入的数据啊!