thekoopa Posted October 14, 2007 Share Posted October 14, 2007 I am following this basic tutorial on building a simple page with php but I keep getting an error. Parse error: syntax error, unexpected '<' in /home/thekoop/public_html/testtest/main.php on line 2 I followed the tutorial exactly as it says. Here's to code for it. <?php <html> <head> <title>Simple PHP page</title> </head> <body> <?php include ($_SERVER['DOCUMENT_ROOT'].'/inc/header.php'); include ($_SERVER['DOCUMENT_ROOT'].'/inc/navigation.php'); include ($_SERVER['DOCUMENT_ROOT'].'/inc/footer.php'); ?> </body> </html> I know this is probably something really dumb but this is my first time using php. Quote Link to comment https://forums.phpfreaks.com/topic/73219-new-to-php/ Share on other sites More sharing options...
kenrbnsn Posted October 14, 2007 Share Posted October 14, 2007 You start PHP in line one, but don't exit it before starting the HTML. Either remove line one, or add a line under it with "?>". Ken Quote Link to comment https://forums.phpfreaks.com/topic/73219-new-to-php/#findComment-369390 Share on other sites More sharing options...
thekoopa Posted October 14, 2007 Author Share Posted October 14, 2007 Thanks for the help. I'm not sure why that was in the tutorial I was reading but at least I got it figured out. Thanks again. Quote Link to comment https://forums.phpfreaks.com/topic/73219-new-to-php/#findComment-369395 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.