无法打开流-XAMPP

问题描述 投票:1回答:1

我有问题。

  • OS-Windows 10
  • 在XAMPP v30204上开发网站
  • 使用PHP

通过链接示例从sql调用动态数据:

[http://127.0.0.1/abbgi/category-page.php?category_id=73-工作,从SQL数据库中提取所有数据,并通过html在表中正确显示。

http://127.0.0.1/abbgi/index.php?content=in-ground-basketball-goal-installation.php-起作用(这是带有主目录的页面上的静态内容,该目录在index.php内容外壳中正确显示)]

http://127.0.0.1/abbgi/index.php?content=category-page.php?category_id=88-错误-错误:

警告:include(category-page.php?category_id = 88):无法打开流:在第98行的C:\ xampp \ htdocs \ abbgi \ index.php中没有这样的文件或目录

警告:include():无法在C:\ xampp \ htdocs \ abbgi \ index.php中打开'category-page.php?category_id = 88'以包含(include_path ='C:\ xampp \ php \ PEAR')在第98行

index.php上的代码:

<?php 
    if (!isset($_REQUEST['content']))
        include("home.php");                    
    else
    {
        $content = $_REQUEST['content'];
        $nextpage = $content;
        include($nextpage);
    }
?>

似乎当链接包含index.php从sql提取数据时,它会中断。

php html sql href
1个回答
0
投票
使用&代替?来分离数据

http://127.0.0.1/abbgi/index.php?content=category-page.php&category_id=88

您在?之后使用了&而不是content=category-page.php
© www.soinside.com 2019 - 2024. All rights reserved.