我得到以下錯誤消息:PHP法塔錯誤:需要():失敗開口所需 '代表爲registration.php'
[24-NOV-2013 10時59分00秒歐洲/斯德哥爾摩] PHP致命錯誤:require():無法在/Applications/MAMP/htdocs/reg4event/register.php中打開所需的'repregisration.php'(include_path ='。:/ Applications/MAMP/bin/php/php5.4.10/lib/php')上線46
腳本register.php看起來是這樣的,其中線46存在:
// Check if SESSION is SET
if ((isset($_SESSION["RegType"])) && (isset($_SESSION["eventId"]))) {
// Check if it is a Rep Registration or a Guest Registration
if ($_SESSION["RegType"] == "rep") {
// The Registration if of type "rep", require the repregistration script
require "repregisration.php";
} elseif ($_SESSION["RegType"] == "guest") {
// The Registration if of type "guest", require the guestregistration script
require "/snippets/guestregistration.php";
} else {
// Neither of "rep" or "guest" was set in the $_SESSION["RegType"], hence header back to index.php page
header("Location: index.php");
exit();
}
} else {
header("Location: index.php");
}
的repregistration.php文件包含此:
<?php
// Check which STAGE the Rep registration process is in
if (!isset($_SESSION["RegStage"])) {
// Include the Registration script
require "/pages/repform.php";
} elseif (isset($_SESSION["RegStage"]) == "review") {
// Include the Review script for the registration to confirm their details
exit("RegStage Review has not been created!");
} elseif ($_SESSION["RegStage"] == "confirmed") {
// Include the Confirmed information
exit("RegStage Confirmed has not been created!");
} else {
header("Location: index.php");
exit();
}
?>
爲什麼我收到錯誤信息?
同一目錄中的所有文件? – Darren
@dbh是的。 – Andreas