Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
Including a php file

 

 


Ginslinger
User

Nov 22, 2006, 1:26 PM

Post #1 of 5 (865 views)
Shortcut
Including a php file Can't Post

Need to include a php file within my front page which uses shtml extensions. Any help appreciated.

Thanks


Damon
Staff / Moderator


Nov 22, 2006, 4:35 PM

Post #2 of 5 (853 views)
Shortcut
Re: [Ginslinger] Including a php file [In reply to] Can't Post

Hi,

As far as I know you can only include a php file in a page that has a php extension.

Another option, although not ideal, would be include the php file in an shtml page using an iframe.

Anyone else have any thoughts or ideas?

--------------------------------------------------- 
Cheers
Damon Edis
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/


Ginslinger
User

Nov 22, 2006, 6:12 PM

Post #3 of 5 (850 views)
Shortcut
Re: [Damon] Including a php file [In reply to] Can't Post

Looks like I may have to change my extensions to PHP.


LostCoder
User

Nov 27, 2006, 5:23 PM

Post #4 of 5 (822 views)
Shortcut
Re: [Ginslinger] Including a php file [In reply to] Can't Post

 
I have posted a technique i use on my sites that have .htm and require PHP processing... It works well for allowing us to publish dynamic advertisements from servers like Linkworth.com and others.. It may work for your PHP issue as well:

----------------------------------------------

For websites hosted on Apache, a workaround to allow php processing with .htm and .html files is possible by updating the .htaccess file in the root web directory (public_html, www, etc.).

Access your root web folder and find the file called .htaccess. If you are unable to locate this file, it can be created through most administrator control panels in the File Manager area. If you are unable to locate or create the .htaccess file contact your hosting company for instructions.

Edit the .htaccess file to include the following code:

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html .shtml

Once the changes are saved, php processing should be allowed on all pages of your website ending in the .php, .htm, .shtm or .html extensions.


source: www.LinkWorth.com
-------------------

Hope this helps.

Thanks.

LC


Ginslinger
User

Nov 28, 2006, 6:03 PM

Post #5 of 5 (805 views)
Shortcut
Re: [LostCoder] Including a php file [In reply to] Can't Post

Thanks LC. I found a small CGI script that will do the needed task. Appreciate the help.