gpt4 book ai didi

php - 解析错误 : syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';'

转载 作者:行者123 更新时间:2023-11-28 16:36:59 27 4
gpt4 key购买 nike

自从我编辑图像的源代码后我就遇到了这个错误。

但是,它在编辑之前工作正常。

这是我的全部代码:

<?php
session_start();
require_once("/home/a9440778/public_html/registration/connect.php");
function escape_data($data)
{
global $dbc;
if(ini_get('magic_qoutes_gpc'))
{
$data=striplashes($data);
}
return mysql_real_escape_string($data,$dbc);
}
error_reporting(E_ALL & ~E_NOTICE);
echo"
<!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>
<title>Natuna Scean Manpower Corporation</title>
<body>
<center>
<table>
<tr>
<td colspan='2' align='center'><img src="/home/a9440778/public_html/registration/head.png" alt="Header Image Here"></center></td>
</tr>
<tr>
<td align='center' colspan='2'>
<img src="/home/a9440778/public_html/registration/jobs.png" alt="Secondary Header Image Here">
</td>
</tr>
<tr><td colspan='2' align='right'>Log in as Staff? <a href='../adminindex.php'> LOG IN</a></td></tr>
<tr><td colspan='2' align='left'>&nbsp;&nbsp;&nbsp;&nbsp;Click on the Job Titles to see more information. </td></tr>
<tr>
<td valign='top' align='left'><font color='#3365f5' size='3'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Deck Officers and Ratings</b></font><br><br>";
$query=mysql_query("select job_id,job_title from jobs where job_category='Deck';")
or die("jbsoftwares 1".mysql_error());
while($myrow=mysql_fetch_array($query))
{
echo"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='jobview.php?job_id=$myrow[0]'>$myrow[1]</a><br/>";
}
echo"</td>
<td valign='top' align='left'><font color='#3365f5' size='3'><b>Engine Officers and Ratings</b></font><br><br>";
$query=mysql_query("select job_id,job_title from jobs where job_category='Engine';")
or die("jbsoftwares 1".mysql_error());
while($myrow=mysql_fetch_array($query))
{
echo"<a href='jobview.php?job_id=$myrow[0]'>$myrow[1]</a><br/>";
}
echo"</td>
</tr>
<tr>
<td valign='top' align='left'><font color='#3365f5' size='3'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Construction</b></font><br><br>";
$query=mysql_query("select job_id,job_title from jobs where job_category='Construction';")
or die("jbsoftwares 1".mysql_error());
while($myrow=mysql_fetch_array($query))
{
echo"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='jobview.php?job_id=$myrow[0]'>$myrow[1]</a><br/>";
}
echo"</td>
<td valign='top' align='left'><font color='#3365f5' size='3'><b>Catering and Galley</b></font><br><br>";
$query=mysql_query("select job_id,job_title from jobs where job_category='Catering and Galley';")
or die("jbsoftwares 1".mysql_error());
while($myrow=mysql_fetch_array($query))
{
echo"<a href='jobview.php?job_id=$myrow[0]'>$myrow[1]</a><br/>";
}
echo"</td>
</tr>
<tr>
<td align='center' colspan='2'>
<img src='/home/a9440778/public_html/footer.png'>
</td>
</tr>
</table>
</center>
</body>
</html>
";
?>

系统指出这一行的错误:

<td colspan='2' align='center'><img src="/home/a9440778/public_html/registration/head.png" alt="Header Image Here"></center></td>

我在这里做错了什么?非常感谢您的回答。

最佳答案

你用双引号开始回显字符串并且 src=".."alt=".." 有双引号,所以你需要使用单个 ' 或使用 \"

转义

关于php - 解析错误 : syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27009538/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com