填相对路径会报错
move_uploaded_file($tmp_name,"uploads/".$filename) 我在uploads/这个地方只能填绝对路径,不然会报错,老师怎么设置的。
move_uploaded_file($tmp_name,"uploads/".$filename) 我在uploads/这个地方只能填绝对路径,不然会报错,老师怎么设置的。
2015-01-02
是目录没找到,填完整就没问题了$path='F:/Demo/test02';
如下:
Warning: move_uploaded_file(test02/188.jpg): failed to open stream: No such file or directory in F:\Demo\test02\doAction2.php on line 23
Warning: move_uploaded_file(): Unable to move 'F:\wamp\tmp\phpB264.tmp' to 'test02/188.jpg' in F:\Demo\test02\doAction2.php on line 23
代码:
...
$path='test02'; //line21
$destination=$path.'/'.$fileInfo['name']; //line22
if(move_uploaded_file($fileInfo['tmp_name'],$destination)){
...
举报