Dracolas Posted October 23, 2009 Share Posted October 23, 2009 Ok i tried to use the search funtion but the word require is everywhere. i'm really new to creating websites... I've built them in the past but allways had some sort of template to go off of from a friend. I'm trying to do it myself with help only when needed so i've tried to figure this out and just can't get it right... i know i can use the css and php to call for pages using the include and require functions but I can't figure out why it's not working... i'm using <?php include("header.php"); ?> and it's not pulling up header.php even if I put the entire url in the "" why would this be? Quote Link to comment https://forums.phpfreaks.com/topic/178757-solved-php-require-help-needed/ Share on other sites More sharing options...
smerny Posted October 23, 2009 Share Posted October 23, 2009 is header.php in the same directory? otherwise show the code in header.php Quote Link to comment https://forums.phpfreaks.com/topic/178757-solved-php-require-help-needed/#findComment-942944 Share on other sites More sharing options...
Dracolas Posted October 23, 2009 Author Share Posted October 23, 2009 yes same directory...here is header.php <?php <HTML><HEAD><TITLE>Welcome to the Lair of Dracolas Legomore!</TITLE> <link href="style.css" ; rel="stylesheet" ; type="text/css" /> </HEAD> <body> <body Background="http://dracolas.webs.com/pics/background.jpg"> <div class="nav"> <a STYLE="text-decoration:none" href="/index.htm"><img src="pics/home1.png" onmouseover="this.src='pics/home2.png';" onmouseout="this.src='pics/home1.png';" /></a> <a href="http://z6.invisionfree.com/The_Dracolas_Forums/index.php"><img src="pics/forums1.png" onmouseover="this.src='pics/forums2.png';" onmouseout="this.src='pics/forums1.png';" /></a> </div> <div class="content"> ?> by the way.. i know that the div's are right because if I just put it all on the index page it works fine.. Quote Link to comment https://forums.phpfreaks.com/topic/178757-solved-php-require-help-needed/#findComment-942948 Share on other sites More sharing options...
MadTechie Posted October 23, 2009 Share Posted October 23, 2009 First try this <?php error_reporting(E_ALL); include("header.php"); ?> this should tell you and errors that are occurring, if that doesn't then check the file has a .php extension ie index.php NOT index.html also you could create a file called phpinfo.php with the following code <?php phpinfo(); ?> open it in the browser (ie http://localhost/phpinfo.php) that should give a ton of info. if it doesn't then something is wrong with the installation Quote Link to comment https://forums.phpfreaks.com/topic/178757-solved-php-require-help-needed/#findComment-942949 Share on other sites More sharing options...
smerny Posted October 23, 2009 Share Posted October 23, 2009 out of curiosity, do you realize you have two body tags? Quote Link to comment https://forums.phpfreaks.com/topic/178757-solved-php-require-help-needed/#findComment-942951 Share on other sites More sharing options...
Dracolas Posted October 23, 2009 Author Share Posted October 23, 2009 hmm it's not giving anything...i think that webs.com doesn't support php.... any1 know of a freehost that does? -smerny- yeah i seen that...that shouldn't matter to the problem though should it? Quote Link to comment https://forums.phpfreaks.com/topic/178757-solved-php-require-help-needed/#findComment-942955 Share on other sites More sharing options...
smerny Posted October 23, 2009 Share Posted October 23, 2009 oh, not supporting php would definitely be a reason, 000webhost.com supports php in the free version i believe Quote Link to comment https://forums.phpfreaks.com/topic/178757-solved-php-require-help-needed/#findComment-942958 Share on other sites More sharing options...
Dracolas Posted October 23, 2009 Author Share Posted October 23, 2009 Thank you guys... new problem... why doesn't it like the < Parse error: syntax error, unexpected '<' in /home/a1237238/public_html/header.php on line 3 header.php <?php <link href="style.css" ; rel="stylesheet" ; type="text/css" /> <body> <body Background="http://dracolas.webs.com/pics/background.jpg"> <div class="nav"> <a STYLE="text-decoration:none" href="/index.htm"><img src="pics/home1.png" onmouseover="this.src='pics/home2.png';" onmouseout="this.src='pics/home1.png';" /></a> <a href="http://z6.invisionfree.com/The_Dracolas_Forums/index.php"><img src="pics/forums1.png" onmouseover="this.src='pics/forums2.png';" onmouseout="this.src='pics/forums1.png';" /></a> </div> <div class="content"> Quote Link to comment https://forums.phpfreaks.com/topic/178757-solved-php-require-help-needed/#findComment-942970 Share on other sites More sharing options...
Dracolas Posted October 23, 2009 Author Share Posted October 23, 2009 acctually hold on i think i got it...give me a minute please YEAH! I just took out the <php because it wasn't needed....and it solved it Quote Link to comment https://forums.phpfreaks.com/topic/178757-solved-php-require-help-needed/#findComment-942975 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.