解析错误:语法错误,意外';' (T_STRING),如何解决?



这是我的连接页面

<?php 
$servername ='localhost';
$username ='root';
$password ='';
$dbname ='credit_list';
$conn = mysqli_connect($servername,$username,$password) or die(mysqli_error());
$dbconnect = mysqli_select_db($conn,$dbname);
?>

这是我的主页

<?php
include "includes/connect_database.php"; 
if(empty($_SESSION)) // if the session not yet started
session_start(); 
if(!isset($_SESSION['username'])) { //if not yet logged in
header("Location:index.php");// send to login page
exit;
}
?>
//codes below are the contents of the home page 

我的服务器显示此错误的问题

解析错误:语法错误,第 2 行 C:\wamp\www\credits\home.php 中意外的"Í3/4"(T_STRING

我该如何解决这个问题?

哈哈只是因为你使用的是希腊问号而不是分号,只需用分号替换希腊问号它们看起来都一样";"(这里是希腊问号)";"(这里是半彩色)

相关内容

最新更新