By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,988 Members | 1,049 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,988 IT Pros & Developers. It's quick & easy.

Novice error: syntax error, unexpected T_STRING

P: 1
I'm getting this error on line 1, it's the only line of PHP in the document. I just want to include a menu file :(

Please help! Thanks!


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>SCO Logistics :: Home : The Leading Supply Chain Optimization Services and Solutions</title>
<link rel="stylesheet" href="css/normal.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.perciformes.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$("#menu li").sfHover();
});

</script>

<?php include("./includes/menu.php"); ?>

</head>
<body>



<!-- css is lacking :[ -->
<table id="content_container">
<tr>
<td class="left">
<div class="header">
a thing
</div>
<div class="content">
<a href="#">a link</a> some stuff<br />
<a href="#">a link</a> some stuff<br />
<a href="#">a link</a> some stuff
</div>
</td>
<td class="middle">
<div class="header">
Who We Are</div>
<div class="content">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<a href="#" class="biglink">
Read Our Mission Statement
<img src="images/circle_arrow_right.png" />
</a>
</div>
</td>
<td background="images/whoweare_right.jpg" class="right"> </td>
</tr>
</table>
<div id="footer">
</div>
</div>
</body>
</html>
Dec 28 '07 #1
Share this Question
Share on Google+
1 Reply


nathj
Expert 100+
P: 938
Hi,

You have the following:
[php]
<?php include("./includes/menu.php"); ?>
[/php]
I think you need either:
[php]
<?php include('../includes/menu.php'); ?>
[/php]
Note the double dot to take the system back up a directory or:
[php]
<?php include('includes/menu.php'); ?>
[/php]
Note there is now no traversing up the directory structure just straight down.

If this doesn't help post back and remember to use the relevant code tags when posting code - it makes it easier to read and therefore easier to help.
Cheers
nathj
Dec 28 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.