PHP头语法

时间:2012-08-17 13:12:02

标签: 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 service@ourstore.com";
$subj = "Your new customer registration"
# $mailsend=mail("$email","$subj","$emess");
header('Location: Profile.php');

在学习PHP时,我们非常感谢任何帮助。

2 个答案:

答案 0 :(得分:10)

你错过了一个分号:

$subj = "Your new customer registration";

答案 1 :(得分:2)

如上所述,您缺少分号

当您遇到内部服务器错误时,可以在日志文件中查找错误

或启用错误在屏幕上打印(DONT在生产时启用)

 ini_set("display_errors",true);
 error_reporting(E_ALL);