我的mysqli_query
无效但未显示错误。任何人都可以看到什么是错的吗?
<?php
include 'includes/config.php';
include_once 'includes/database.php';
if(@$_POST['submit']){
$tempdir=@$_FILES['picture']['tmp_name'];
$file=@$_FILES['picture']['name'];
move_uploaded_file($tempdir, "../upload/".$file );
echo $insert="insert into ararticles set title ='".@$_POST['title']."',text'".@$_POST['text']."',date'".@$_POST['date']."',article_pic='".$file."'";
$run=mysqli_query($connection,$insert);
if($run){
header("location:varticle.php");
}
}
配置文件
define("DB_SERVER","localhost");
define("DB_USERNAME","root");
define("DB_PASS","");
define("DB_NAME","firstfullwebsite");
数据库文件
$connection = mysqli_connect(DB_SERVER,DB_USERNAME,DB_PASS,DB_NAME);