无法打开流 - XAMPP
Failed to open stream - XAMPP
我有问题。
- OS - Windows 10
- 在 XAMPP v30204
上开发网站
- 使用PHP
通过 link 示例从 sql 调用动态数据:
http://127.0.0.1/abbgi/category-page.php?category_id=73
- 有效,从 SQL 数据库中提取所有数据并通过 table 中的 html 正确显示。
http://127.0.0.1/abbgi/index.php?content=in-ground-basketball-goal-installation.php
- 有效(这是页面上的静态内容,主目录在 index.php 内容 shell 中正确显示)
http://127.0.0.1/abbgi/index.php?content=category-page.php?category_id=88
- 错误 - 错误:
Warning: include(category-page.php?category_id=88): failed to open stream: No such file or directory in C:\xampp\htdocs\abbgi\index.php on line 98
Warning: include(): Failed opening 'category-page.php?category_id=88' for inclusion (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\abbgi\index.php on line 98
index.php 上的代码:
<?php
if (!isset($_REQUEST['content']))
include("home.php");
else
{
$content = $_REQUEST['content'];
$nextpage = $content;
include($nextpage);
}
?>
似乎当 link 包含 index.php 从 sql 中提取数据时它会中断。
使用&
来分隔数据而不是?
http://127.0.0.1/abbgi/index.php?content=category-page.php&category_id=88
您在 content=category-page.php
之后使用了 ?
而不是 &
我有问题。
- OS - Windows 10
- 在 XAMPP v30204 上开发网站
- 使用PHP
通过 link 示例从 sql 调用动态数据:
http://127.0.0.1/abbgi/category-page.php?category_id=73
- 有效,从 SQL 数据库中提取所有数据并通过 table 中的 html 正确显示。
http://127.0.0.1/abbgi/index.php?content=in-ground-basketball-goal-installation.php
- 有效(这是页面上的静态内容,主目录在 index.php 内容 shell 中正确显示)
http://127.0.0.1/abbgi/index.php?content=category-page.php?category_id=88
- 错误 - 错误:
Warning: include(category-page.php?category_id=88): failed to open stream: No such file or directory in C:\xampp\htdocs\abbgi\index.php on line 98
Warning: include(): Failed opening 'category-page.php?category_id=88' for inclusion (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\abbgi\index.php on line 98
index.php 上的代码:
<?php
if (!isset($_REQUEST['content']))
include("home.php");
else
{
$content = $_REQUEST['content'];
$nextpage = $content;
include($nextpage);
}
?>
似乎当 link 包含 index.php 从 sql 中提取数据时它会中断。
使用&
来分隔数据而不是?
http://127.0.0.1/abbgi/index.php?content=category-page.php&category_id=88
您在 content=category-page.php
?
而不是 &