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. 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 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. Link to comment https://forums.phpfreaks.com/topic/73219-new-to-php/#findComment-369395 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.