我的项目有一些问题,我正在制作一个漫画阅读器网站,并且我制作了多种形式的章节图片,所以这里是代码
$manga_id = $_GET['manga_id'];
mysql_connect("localhost","root","");
mysql_select_db("task3");
$chapternumber = $_POST['chapternumber'];
$chaptertitle = $_POST['chaptertitle'];
$a=0;
foreach ($_FILES['pictures']['name'] as $filename)
{
$tmp=$_FILES['pictures']['tmp_name'][$a];
$target = "C:\\wamp\\www\\task\\comic\\images\\chapter\\".$_FILES['pictures']['name'][$a];
move_uploaded_file($tmp, $target);
rename("images/chapter/$filename","images/chapter/$manga_id-$chapternumber-$a.jpg");
$a=$a + 1;
mysql_query("insert into chapter(ID_Komik,No_Chapter,ch_title,Halaman,pictures)
values ('$manga_id','$chapternumber','$chaptertitle','$a','$manga_id-$chapternumber-$a.jpg')");
}
header("Location: main.php?page=manga&&manga_id=$manga_id");
我的语法有什么问题?数据库中的文件已重命名,但文件没有移动到目标,我是 php 的新手,但我必须更加努力,请回答,对不起我的英语不好