我試圖做一個註冊和登錄系統,我在此代碼得到一個語法錯誤在那裏我使用PHP頭語法
header('Location: Profile.php');
在這段代碼的使用如下上下文:
/* send email to new Customer */
$emess = "You have sucessfully registered. ";
$emess .= "Your new username and password are: ";
$emess .= "\n\n\t$loginName\n\t";
$emess .= "$password\n\n";
$emess .= "We appreciate your interest. \n\n";
$emess .= "If you have any questions or problems, ";
$emess .= " email [email protected]";
$subj = "Your new customer registration"
# $mailsend=mail("$email","$subj","$emess");
header('Location: Profile.php');
任何幫助將不勝感激,因爲我學習PHP。
**什麼**語法錯誤?如果你不告訴我們什麼是錯的,我們不能幫助我們。 – meagar 2012-08-17 13:13:14
它不會拋出語法錯誤,但Location標頭表絕對URI,而不是相對的。 – Quentin 2012-08-17 13:14:09
這是真的,該標準要求絕對網址,但大多數現代瀏覽器也可以處理相關的網址,所以這不是問題。 問題當然是缺少分號 – 2012-08-17 13:16:24