jalpro Posted February 23, 2011 Share Posted February 23, 2011 Hey guys! New to Heliohost. This is the code that won't parse: <div id="newscontent" class="flexcroll"> <?php include("php/indexnews.php");?> </div> The same code is used on my old host, which, when viewing the source, would be replaced by the html in the indexnews.php file. But instead all I see is the original code. The php runs fine, because I can open the file using the browser address bar and it returns the data correctly. Help! Thanks Quote Link to comment Share on other sites More sharing options...
Guest Geoff Posted February 23, 2011 Share Posted February 23, 2011 Does your file end in .php? Quote Link to comment Share on other sites More sharing options...
jalpro Posted February 23, 2011 Author Share Posted February 23, 2011 The code above is from index.html Quote Link to comment Share on other sites More sharing options...
Byron Posted February 23, 2011 Share Posted February 23, 2011 Any pages using php need to have a .php extension. So the easiest solution would be to rename your page to index.php. If that's a problem for you and you have many pages on your site using php with a .html extension, you could add this piece of code to your root .htaccess file: AddHandler application/x-httpd-php5 .html Now all of your files ending in .html will be parsed for php. Quote Link to comment Share on other sites More sharing options...
jalpro Posted February 23, 2011 Author Share Posted February 23, 2011 Thanks! That worked! For anyone who is reading this post having the same problem, this is what my "/public_html/.htaccess" file looks like now: # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthName jalpro.heliohost.org AuthUserFile /home1/jalpro/public_html/_vti_pvt/service.pwd AuthGroupFile /home1/jalpro/public_html/_vti_pvt/service.grp AddHandler application/x-httpd-php5 .html Thanks Quote Link to comment Share on other sites More sharing options...
jje Posted February 23, 2011 Share Posted February 23, 2011 Glad your problem got solved. Quote Link to comment Share on other sites More sharing options...
Guest Geoff Posted February 23, 2011 Share Posted February 23, 2011 Be aware that having php parse your html files is a performance hit. Quote Link to comment Share on other sites More sharing options...
jalpro Posted February 25, 2011 Author Share Posted February 25, 2011 Be aware that having php parse your html files is a performance hit. Explain...? Quote Link to comment Share on other sites More sharing options...
Byron Posted February 25, 2011 Share Posted February 25, 2011 It's really not that big of a deal. I'm sure your other site was set up the same way if html pages were parsing php. All it means is that all of your html pages will be parsed for php wether they use php or not. You'll probably never notice the difference. Quote Link to comment Share on other sites More sharing options...
jalpro Posted March 7, 2011 Author Share Posted March 7, 2011 It's really not that big of a deal. I'm sure your other site was set up the same way if html pages were parsing php. All it means is that all of your html pages will be parsed for php wether they use php or not. You'll probably never notice the difference. Very true! My longest PHP files are only around 20-40 lines long, which I very much doubt are going to take very long to parse. (Are comments ignored by the parser?) Besides, my last host was really slow, so Heliohost is a big improvement nevertheless! Quote Link to comment Share on other sites More sharing options...
Byron Posted March 7, 2011 Share Posted March 7, 2011 Your php pages want take any longer, just your html pages that don't have any php. But it probably want be any thing noticable. Quote Link to comment 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.