我有這個網站工作得很好。它已經運行了一年多了,而且我只是要求添加一件小東西。我打破了我的代碼,不知道發生了什麼
我在代碼行200左右添加了這個東西,並重新上傳了我的php頁面。我從來沒有觸及近1號線什麼,但是當我刷新頁面,我用這個錯誤招呼:
Fatal error: Call to undefined function phpinclude() in /home/ropepart/public_html/techportal/select.php on line 1
是怎麼回事?
這是我的代碼的前幾行。從字面上看與1號線開始(順便說一句,我刪除,我只加一個小東西,以確保沒有它,但是沒有,我仍然收到此錯誤。)
<?php session_start();?>
<?php
include("passwords.php");
....code continues on from here....
有在?php和include之間沒有空格。只有一個艱難的輸入。當我在那裏添加一個空間時,我不會再收到錯誤,但我的用戶也沒有正確登錄會話。
想法?
編輯:
<h2>Please select the test you'd like to take:</h2>
\t <table>
\t \t <tr>
\t \t \t <td><a href="hazcomtest.php" class="btn">Hazcom</a></td>
\t \t \t <td><a href="nfpa70etest.php" class="btn">NFPA 70e</a></td>
\t \t </tr>
\t \t <tr> \t
\t \t \t <td><a href="confinedspacetest.php" class="btn">Confined Space</a></td>
\t \t \t <td><a href="extremetemperaturestest.php" class="btn">Extreme Temperatures</a></td>
\t \t </tr>
\t \t <tr>
\t \t \t <td><a href="ppetest.php" class="btn">Personal Protective Equipment</a></td>
\t \t \t <td><a href="materialhandlingtest.php" class="btn">Material Handling</a></td>
\t \t </tr>
\t \t <tr> \t
\t \t \t <td><a href="bloodbornepathogenstest.php" class="btn">Bloodborne Pathogens</a></td>
\t \t \t <td><a href="workingregulationsdisclaimer.php" class="btn">Working Regulations</a></td>
\t \t </tr>
\t </table> \t
所以上面的原代碼,我有,我已經然後返回。 (這是我目前有。)
我加
<tr>
<td><a href="ladsaf.php" class="btn">ladsaf</a></td>
</tr>
我把這種去除。從字面上輸入它,它不起作用,所以我刪除了它。現在沒有任何工作。所以難住!
而對於笑聲......這裏是整個頁面! (我想,它更像是我輸入的代碼,而不是200 ......對此感到遺憾線50 ...)
<?php
session_start();
include("passwords.php");
//this statement will be entered if coming from the login.php page.
if ($_POST["ac"]=="log"){
\t //check if submitted username and password exist in $PASSWORD array
\t if ($PASSWORD[$_POST["username"]]==$_POST["password"]){
\t
\t \t //set various session variables
\t \t $_SESSION["username"]=$_POST["username"];
\t \t $_SESSION["firstname"]=$FIRSTNAME[$_POST["username"]];
\t \t $_SESSION["lastname"]=$LASTNAME[$_POST["username"]];
\t \t $_SESSION["email"]=$EMAIL[$_POST["username"]];
\t }
\t else{
\t //if username and password do not exist, set session variable for "incorrect username/password" message and redirect to login.php
\t \t $_SESSION['incorrect'] = "incorrect";
\t \t header('Location: login.php');
\t };
};
// check if user is logged in already when they are coming from a random place. If not, redirect to login.php
check_logged();
?>
<html>
<head>
\t <title>Select Test</title>
\t <link rel="stylesheet" type="text/css" href="stylesheet.css">
\t <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
</head>
<body>
<!--Links to all the various tests available on the site-->
<div class="center">
<h2>Hi <?php echo $_SESSION["firstname"].' '.$_SESSION["lastname"].'. You have logged in successfully.';?></h2><br>
<h2>Please select the test you'd like to take:</h2>
\t <table>
\t \t <tr>
\t \t \t <td><a href="hazcomtest.php" class="btn">Hazcom</a></td>
\t \t \t <td><a href="nfpa70etest.php" class="btn">NFPA 70e</a></td>
\t \t </tr>
\t \t <tr> \t
\t \t \t <td><a href="confinedspacetest.php" class="btn">Confined Space</a></td>
\t \t \t <td><a href="extremetemperaturestest.php" class="btn">Extreme Temperatures</a></td>
\t \t </tr>
\t \t <tr>
\t \t \t <td><a href="ppetest.php" class="btn">Personal Protective Equipment</a></td>
\t \t \t <td><a href="materialhandlingtest.php" class="btn">Material Handling</a></td>
\t \t </tr>
\t \t <tr> \t
\t \t \t <td><a href="bloodbornepathogenstest.php" class="btn">Bloodborne Pathogens</a></td>
\t \t \t <td><a href="workingregulationsdisclaimer.php" class="btn">Working Regulations</a></td>
\t \t </tr>
\t </table> \t
\t \t
<h2>Click this button to check out the Rope Partner Pay Calculator</h2>
\t <table>
\t \t <tr>
\t \t \t <td><a href="Paycalculator/index.php" class="btn">Pay Calculator</a></td>
\t \t </tr> \t
\t </table>
\t
<h2>Or click this button to logout.</h2>
\t <table> \t
\t \t <tr>
\t \t \t <td><a href="logout.php" class="btn">Logout</a></td>
\t \t </tr>
\t </table>
</div>
</body>
</html>
刪除第二個<?php'並刪除第一個?>',那麼你添加的代碼是什麼? –
Pssssst。 https://git-scm.com/ – ceejayoz
謝謝@教授縮放只是嘗試刪除第二個<?php和第一個?>沒有運氣。 我添加的代碼是一個表格行。