【问题标题】:Localhost is currently unable to handle this request_header location本地主机当前无法处理此 request_header 位置
【发布时间】:2016-06-02 09:16:05
【问题描述】:
    <?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

我不知道我做错了什么。

【问题讨论】:

    标签: php header location localhost shop


    【解决方案1】:

    尝试替换这个:

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

    有了这个:

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

    【讨论】:

      猜你喜欢
      • 2021-11-16
      • 2017-06-18
      • 2016-11-06
      • 2019-02-12
      • 1970-01-01
      • 2016-09-01
      • 2016-07-11
      • 2017-05-03
      相关资源
      最近更新 更多