Jump to content
KateMacwil

Using iframe to display a php file

Recommended Posts

Hi

I have created a php file and would like to use the <iframe> tag to display the contents on a web page.

I tried that as follows:


<iframe src="/home/apldvhwt75w1/public_html/wp-content/plugins/my-schools/schools-users-view.php"
width="800" height="500" frameborder="0"></iframe>

and all I got was a blank page.

 

Share this post


Link to post
Share on other sites

Your frame src is a local file path.  It needs to be the HTTP server path.

Share this post


Link to post
Share on other sites

Your frame src is a local file path.  It needs to be the HTTP server path.

Share this post


Link to post
Share on other sites

You create pages/posts in wordpress editor by selecting post/page template, the title is usually used to create the url to this page/post, but you have the option to edit it. You could create your own template without header/footer if you wish, to only show the main content area.

The url from the editor for that specific page/post is what you should be using.

Edited by dsonesuk

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

×