Jump to content
xisto Community
Cerb

Php Include Script How to add into a table

Recommended Posts

You can see at cerb.trap17.com how I have my menus set up. For each of the 3 side menus, I would like to use a PHP include script, rather than iFrames. This is the code I've been playing around with:

<?php include('myframe.htm'); ?>

With myframe.htm being the page I want to include in that cell. For some reason it will not include the page. Is that the correct code for doing such a thing? Am I doing something wrong; leaving something out. maybe?

Thanks.

Share this post


Link to post
Share on other sites

You'll have to include the full path so it will probably be something like '/public_html/yourdirectory/myframe.htm'.

You dont have to include the full path. Only the file "myframe.htm" has to be in the same folder as the file using the php include code.

Share this post


Link to post
Share on other sites

You'll have to include the full path so it will probably be something like '/public_html/yourdirectory/myframe.htm'.

159927[/snapback]

I thought the full path is '/home/[cpanel login name]/public_html/[filename]'?

Share this post


Link to post
Share on other sites

truefusion is right most people put the php scripts with the file that they are using to make it run smoothly. it could e something else though, but the php coding is right, did you change your index file to index.php?

Share this post


Link to post
Share on other sites

Doh! I just didn't change the extension on my index page etc.

If you want html documents to work like php documents, then you should do this:

Go to mime types from your cpanel and add a mime type: application/x-httpd-php : .html

Share this post


Link to post
Share on other sites

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...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.