Mysqli_query无法正常工作且未显示任何错误

时间:2016-06-20 16:34:59

标签: php mysqli

我的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);

0 个答案:

没有答案