我已经将这段代码用于运行一段时间且突然
的网页这是一个人们提交个人数据的页面,以便他们可以报名参加专业课程。
<?php
$hostname_conexaoBD = "hostname"; // ou IP, caso acesse por outro host
$database_conexaoBD = "database_name";// nome do banco que vc criou
$username_conexaoBD = "username";// usuario do banco, nomalmente o mysql cria um com o nm roo
$password_conexaoBD = "password"; // se tiver senha coloque aqui
$conexaoBD = mysql_pconnect($hostname_conexaoBD, $username_conexaoBD, $password_conexaoBD) or trigger_error(mysql_error(),E_USER_ERROR); // tenta conectar, se num aparecer nenhum ero esta tudo OK
// ligacao a base de dados
mysql_select_db($database_conexaoBD);
//Selecciona o curso
$query_rsCursos = "SELECT * FROM `cursos` where activo = '1'";
$Recordset1 = mysql_query($query_rsCursos, $conexaoBD) or die(mysql_error());
$data = date("Y-m-d");;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
//<bunch of meta data supressed cuz reasons>
<link href="templatemo_style.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
function clearText(field)
{
if (field.defaultValue == field.value) field.value = '';
else if (field.value == '') field.value = field.defaultValue;
}
</script>
</head>
<body>
//html suppressed for sanity
</body>
</html>
我没有制作此代码,我已经看了一段时间,但我无法找到错误。 HALP!
编辑:btw on my logs我收到错误说&#34;解析错误:语法错误,意外结束文件&#34;在最后一行代码