1
    <?php
    if (!isset($_POST['productId'])){
    header("location:http://localhost/WerkstukBWD/index.php");
    exit;
    }
    else {
    include_once 'DAO/WinkelwagenDAO.php';
    include_once 'Model/WinkelwagenItems.php';
    $winkelwagenItem = new WinkelwagenItems($_POST['aantalEenheden'],$_POST['productId']);
    WinkelwagenDAO::vermeerderAantalItems($winkelwagenItem);
    header("location:AdminPagina.php");
    }

我希望能够在我的购物车中添加东西,但每次我使用此代码时都会出现 localhost 错误

The localhost page isn’t working  
localhost is currently unable to handle this request.
500

我不知道我做错了什么。

4

1 回答 1

0

尝试替换这个:

include_once 'DAO/WinkelwagenDAO.php';
include_once 'Model/WinkelwagenItems.php';

有了这个:

include_once('DAO/WinkelwagenDAO.php');
include_once('Model/WinkelwagenItems.php');
于 2016-06-02T09:46:48.400 回答