2010-07-01 110 views
0

我收到以下錯誤;PHP錯誤,語法錯誤T_STRING!

Parse error: syntax error, unexpected T_STRING in D:\XAMPP\xampp\htdocs\site\register.php on line 95 

95行是;

if (strstr($email, "@") && strstr($email, ".") strlen($email) >=6)) 

請幫忙,我不知道什麼是錯的:/這一切對我來說都很好。

在此先感謝!

+1

你的括號不平衡。 – 2010-07-01 17:13:03

+0

有你使用的是IDE,它會突出語法錯誤,並幫助平衡你的括號認爲 – piddl0r 2010-07-01 17:34:16

回答

4

您在撥打strlen()電話之前忘記了話務員。另外,最後還有一個額外的)

2

在此位置出現的語法錯誤:

if (strstr($email, "@") && strstr($email, ".") strlen($email) >=6)) 
              ^

而且你有一個右括號,但沒有相應的開括號:

if (strstr($email, "@") && strstr($email, ".") strlen($email) >=6)) 
                   ^

你大概的意思:

if (strstr($email, "@") && strstr($email, ".") && strlen($email) >= 6) 

或者:

if (strstr($email, "@") && strstr($email, ".") && (strlen($email) >= 6)) 
+0

那麼,它修復了。但現在我得到另一個新的錯誤:/ 上線102 我會盡力和數字意外T_ELSE那一個出自己,謝謝! :) – Hugo 2010-07-01 17:18:10

相關問題