我在 PHP 中遇到分号错误,并且无法理解为什么这是一个问题
这是错误消息:
解析错误:语法错误,意外的“;”在 /home1/goldensu/public_html/camira/contactForm.php 第 155 行
,这是代码:
$sendMessage = "Someone is interested in becoming a reseller or installer.<br /><br /><br />
<b><u>Country</u>:</b> "
.stripslashes($country)."<br /><br />\n
<b><u>Company Name</u>:</b> "
.stripslashes($companyName)."<br /><br />\n
<b><u>Office Address</u>:</b> "
.stripslashes($officeAddress)."<br /><br />\n
<b><u>Company Phone</u>:</b> "
.stripslashes($companyPhone)."<br /><br />\n
<b><u>Company Email</u>:</b> "
.stripslashes($companyEmail)."<br /><br />\n
<b><u>Web page</u>:</b> "
.stripslashes($webPage."<br /><br />\n
<b><u>Number of emplyees</u>:</b> "
.stripslashes($numberEmployees)."<br /><br />\n
<b><u>Yearly turnover</u>:</b> "
.stripslashes($turnover)."<br /><br />\n
<b><u>Marketing Activities</u>:</b> "
.stripslashes($marketingActivities)."<br /><br />\n
<b><u>Annual marketing budget</u>:</b> "
.stripslashes($marketingBudget)."<br /><br />\n
<b><u>Current renewable energy products</u>:</b> "
.stripslashes($energyProducts)."<br /><br />\n
<b><u>Length of agreements</u>:</b> "
.stripslashes($agreements)."<br /><br />\n
<b><u>Territories</u>:</b> "
.stripslashes($territories)."<br /><br />\n
<b><u>Staff Qualifications</u>:</b> "
.stripslashes($staffQualifications)."<br /><br />\n";
它抱怨末尾的分号。是不是有什么蠢事?
This is the error message:
Parse error: syntax error, unexpected ';' in /home1/goldensu/public_html/camira/contactForm.php on line 155
and this is the code:
$sendMessage = "Someone is interested in becoming a reseller or installer.<br /><br /><br />
<b><u>Country</u>:</b> "
.stripslashes($country)."<br /><br />\n
<b><u>Company Name</u>:</b> "
.stripslashes($companyName)."<br /><br />\n
<b><u>Office Address</u>:</b> "
.stripslashes($officeAddress)."<br /><br />\n
<b><u>Company Phone</u>:</b> "
.stripslashes($companyPhone)."<br /><br />\n
<b><u>Company Email</u>:</b> "
.stripslashes($companyEmail)."<br /><br />\n
<b><u>Web page</u>:</b> "
.stripslashes($webPage."<br /><br />\n
<b><u>Number of emplyees</u>:</b> "
.stripslashes($numberEmployees)."<br /><br />\n
<b><u>Yearly turnover</u>:</b> "
.stripslashes($turnover)."<br /><br />\n
<b><u>Marketing Activities</u>:</b> "
.stripslashes($marketingActivities)."<br /><br />\n
<b><u>Annual marketing budget</u>:</b> "
.stripslashes($marketingBudget)."<br /><br />\n
<b><u>Current renewable energy products</u>:</b> "
.stripslashes($energyProducts)."<br /><br />\n
<b><u>Length of agreements</u>:</b> "
.stripslashes($agreements)."<br /><br />\n
<b><u>Territories</u>:</b> "
.stripslashes($territories)."<br /><br />\n
<b><u>Staff Qualifications</u>:</b> "
.stripslashes($staffQualifications)."<br /><br />\n";
It's complaining about the semicolon at the end. Is it something stupid?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
问题就在这里:
看来您错过了右括号 ) :
Problem is here:
it appears you have missed a closing bracket ) :
在这种情况下,它很可能是前面的表达式中缺少括号。
看起来是这样的:(
通过应用 magic_quotes 解决方法集中应用可以避免的错误。)
In this context it's most likely a missing paranthesis in the previous expressions.
It seems this one:
(A error that could have been avoided by applying a magic_quotes workaround centrally.)
刚刚看到缺少的右括号...我真傻!
Just seen the missing closing bracket... Silly me!