访问任何选项时出现PHP错误

时间:2018-04-03 18:00:01

标签: php netbeans phpmyadmin

我正在使用phpMYADMIN和netbeans进行编码,当我在页面顶部的netbeans中按运行项目时,我收到此错误:`

Warning: include(utils/mysql.class.php): failed to open stream: No such file or directory in C:\xampp1\htdocs\autonuoma\index.php on line 6

Warning: include(): Failed opening 'utils/mysql.class.php' for inclusion (include_path='C:\xampp1\php\PEAR') in C:\xampp1\htdocs\autonuoma\index.php on line 6

我的整个是index.php是:

<?php
    // nuskaitome konfigūracijų failą
    include 'config.php';

    // iškviečiame prisijungimo prie duomenų bazės klasę
    include 'utils/mysql.class.php';

    // nustatome pasirinktą modulį
    $module = '';
    if(isset($_GET['module'])) {
        $module = mysql::escape($_GET['module']);
    }

    // jeigu pasirinktas elementas (sutartis, automobilis ir kt.), nustatome elemento id
    $id = '';
    if(isset($_GET['id'])) {
        $id = mysql::escape($_GET['id']);
    }

    // nustatome, kokia funkcija kviečiama
    $action = '';
    if(isset($_GET['action'])) {
        $action = mysql::escape($_GET['action']);
    }

    // nustatome elementų sąrašo puslapio numerį
    $pageId = 1;
    if(!empty($_GET['page'])) {
        $pageId = mysql::escape($_GET['page']);
    }

    // nustatome, kurį valdiklį įtraukti šablone main.tpl.php
    $actionFile = "";
    if(!empty($module) && !empty($action)) {
        $actionFile = "controls/{$module}_{$action}.php";
    }

    // įtraukiame pagrindinį šabloną
    include 'templates/main.tpl.php';
?>

当我点击网页中的某个菜单选项时,它也会返回错误:

Warning: include(utils/mysql.class.php): failed to open stream: No such file or directory in C:\xampp1\htdocs\autonuoma\index.php on line 6

Warning: include(): Failed opening 'utils/mysql.class.php' for inclusion (include_path='C:\xampp1\php\PEAR') in C:\xampp1\htdocs\autonuoma\index.php on line 6

Fatal error: Uncaught Error: Class 'mysql' not found in C:\xampp1\htdocs\autonuoma\index.php:11 Stack trace: #0 {main} thrown in C:\xampp1\htdocs\autonuoma\index.php on line 11

我的问题是,导致这种情况的原因是什么?网页正在加载,但它不会让我点击任何内容,因为提到错误发生。我知道这可能听起来很傻但我找不到错误

`

0 个答案:

没有答案