软件开发PHP页面使用jq的AJAX提交表单检查到接值的页面接不到$_FILES变量

php:

<?php include 'header1.php'; ?>

<?php
//1.创建数据库
$con = mysql_connect("localhost","root","root");
//2.验证
if($con){
//echo "数据库连接成功
";
}else{
echo "数据库连接失败
";
}
//3.指定数据库
mysql_select_db("sgjydb",$con);
//4.读取数据
mysql_query("set names utf8");//指定字符编码
$query = "select * from imgclasstab";

$result = mysql_query($query);
if($result){
//echo "查找数据成功
";

}else{
echo "查找数据失败
".mysql_errno();
}
?>

<?php
while ($list = mysql_fetch_array($result)){
//echo "id=".$list["imgClassId"];
$imgClassId = 1;
echo '';
echo '<img src="https://www.jcdi.cn/wenda/'.$list[" imgclasscoverurl"].' alt="img01" style="overflow-wrap: break-word; border-width: 0px; border-style: initial; margin: 0px auto; padding: 0px; outline: 0px; height: auto; display: block;">';
//echo "当前的图地址:".$list["imgClassCoverUrl"];
//$tjquery = "select imgClassId,imgClassDescription from imgclasstab where imgClassCoverUrl=".$list["imgClassCoverUrl"];
//$tjresult = mysql_query($tjquery);
//$tjId = $list["imgClassId"];
echo '

';
echo '

'.$list["imgClassCName"].'

';
echo '

'.$list["imgClassDescription"].'
';
echo '<a href="https://www.jcdi.cn/wenda/xcgl_ny.php?id=%27.$list[" imgclassid"].' title="1" data-gallery="" style="overflow-wrap: break-word; color: rgb(49, 105, 176); outline: 0px;">查看更多

';
echo '

';
echo '';
}
?>

×

创建相册

相册封面图:

相册名称:

相册描述:

取消

php:

<?php
$bb = 'begin';
$xcCover = $_POST["classCover"];
/*echo "相册封面:".$xcCover."
";
$aa = $_FILES["'".$xcCover."'"]['name'];
echo "相册封面名称:".$aa."
";*/
$aa = $_FILES["'".$xcCover."'"]['type'];
echo "相册封面类型:".$aa."
";
$scName = $_POST["className"];
echo "相册名称:".$scName."
";
$xcDes = $_POST["classDesciription"];
echo "相册描述:".$xcDes."
";

/*$addXcBtn = $_POST["addXcBtn"];
echo "获取到相册封面的name是:".$addXcBtn."
";

$xcCover = $_POST["classCover"];
echo "获取到相册封面的name是:".$xcCover."
";
*/
/*$aa = 'ww';
if($aa == 'w'){
echo "创建成功";
}else{
echo "创建失败";
}
$aa = 'begin';
$addXcBtn = $_POST["addXcBtn"];
echo "获取的提交按钮的value是:".$addXcBtn."
";
$xcCover = $_POST["classCover"];
echo "封面value是:".$xcCoverName;
$xcCoverName = $_FILES["'".$xcCover."'"]['name'];
echo "封面名称是:".$xcCoverName;
*/
if($bb == 'w'){
echo "创建成功";
}else{
echo "创建失败";
}

?>

(0)

相关推荐