我正在开发一个网站,但我并不真正了解正在发生的问题......
主页中的表格内有一个链接。当我点击它时,它应该为超链接页面提供一些 GET 参数。接收页面对其进行处理,更新数据库并重定向到主页。
我require_once()
在主页中包含了一些必要的 php 文件作为“”。但我不能在处理页面上这样做。它给出了一些警告。我真的不明白为什么,我不知道这个问题的解决方案。请帮忙!
主页中的代码:
<?php require_once("includes/db_connection_open.php"); ?>
<?php require_once("includes/functions.php"); ?>
<?php include("includes/header_main.php"); ?>
<?php
echo "<td><a href='includes/process.php?id=".$arr['id']."'>Process</a></td>";
?>
<?php include("includes/body_footer_main.php"); ?>
<?php require_once("includes/db_connection_close.php"); ?>
处理页面中的代码:
<?php require_once("includes/db_connection_open.php"); ?>
<?php require_once("includes/functions.php"); ?>
//Processing codes
<?php require_once("includes/db_connection_close.php"); ?>
我收到的警告是:
警告:require_once(includes/db_connection_open.php) [function.require-once]:无法打开流:第 1 行的 C:\xampp\htdocs\MySite\includes\process.php 中没有这样的文件或目录
致命错误:require_once() [function.require]:在 C:\xampp\htdocs\MySite\includes\ 中打开所需的 'includes/db_connection_open.php' (include_path='.;C:\xampp\php\PEAR') 失败第 1 行的 process.php