他們都在我的XAMMP沙箱上正常工作,但現在什麼都沒有。我的包括似乎沒有工作,現在我已經上傳文件到生產服務器
我做錯了什麼。
下面是代碼:
的index.php
包含質量包括,基本上具有所有包括在其中。
<?php
//Starting session
session_start();
//Includes mass includes containing all the files needed to execute the full script
//Also shows homepage elements without customs
include ("includes/mass.php");
//Login Form
$login =
"<form id='signin' action = 'login.php' method = 'POST'>
Username<input type= 'text' name= 'username'>
Password<input type= 'password' name= 'password'>
<input type= 'submit' value='login' name='submit'>
</form>";
//Calculate number of users online
$num_users_sql = mysql_query("SELECT * FROM user WHERE loggedin = '1' ", $con);
$num_online_users = mysql_num_rows($num_users_sql);
//user bash link
$user = "<a href='user.php'>User</a><br>";
//Register Form Link
$registerlink = "<a id='signup' href='register.php'>Sign Up</a>";
//Logged In User Links
$logoutlink = "<a id='logoutlink' href='logout.php'>Log out</a>";
$message = "<div id='welcome'>"."Hello"." ".$_SESSION['username']."!"."</div>";
$num_users_online = "<div id='users_online'><h2>There are ".$num_online_users." Users On Readnotes Right nw!</h2>"."</div>";
if (isset($_SESSION['username']))
//If user is logged in
{
echo $message;
echo $user;
echo "</br>";
echo $num_users_online;
echo $logoutlink;
}
//If user is logged out
else
{
echo $login;
echo $registerlink;
}
?>
質量包括
包含了我所有的包括
<?php
/*Mass include - mass.php*
*Includes all thing needed for operations to start*/
//Grab Header design & details
require("header.html");
//Grab Footer design & details
require("footer.html");
//Grab include to connect to the database!
require("dbcon.php");
?>
感謝名單。
現在什麼?你的問題在哪裏? – Gumbo 2010-02-28 09:57:02
問題是什麼 – Tapha 2010-02-28 10:01:47
Gumbo的意思是:「什麼*它不起作用」*意思是說,在你的情況下? ;;你有什麼錯誤信息嗎? – 2010-02-28 10:02:59