Jump to content

Recommended Posts

Posted

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 :)

Posted

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.

 

Posted

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 :)

Posted

Be aware that having php parse your html files is a performance hit.

Posted

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.

 

  • 2 weeks later...
Posted
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!

Posted

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.

 

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...