因为我编辑了图片的来源,我收到了这个错误。
但是,它在编辑之前工作正常。
这是我的整个代码:
<?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'> Click on the Job Titles to see more information. </td></tr>
<tr>
<td valign='top' align='left'><font color='#3365f5' size='3'> <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" <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'> <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" <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>
我在这里做错了什么? 非常感谢您的回答。
答案 0 :(得分:2)
您使用双引号启动了回显字符串,并且src=".."
和alt=".."
有双引号,因此您需要使用单'
或使用\"
<转义它/ p>