Offline stuff

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Ppaiem
Forum Newbie
Posts: 1
Joined: Sun Jun 15, 2008 4:55 pm

Offline stuff

Post by Ppaiem »

Hey! I have a an offline html website and would like to make an internal link to an offline php application in my php root directory. I know I can run an application using 127.0.0.1/index.php, but I want to have a <a href=index.php>BLOG</a> or something similar in my html website and have the app run in a frame.

How do I do that?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Offline stuff

Post by John Cartwright »

Code: Select all

<a href=http://localhost/index.php>BLOG</a>
?
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Re: Offline stuff

Post by Ambush Commander »

Jcart's link should work. Ideally, the HTML pages should also be served by your webserver.
User avatar
Greenconure
Forum Commoner
Posts: 30
Joined: Mon Jun 16, 2008 8:19 am

Re: Offline stuff

Post by Greenconure »

Ppaiem wrote:Hey! I have a an offline html website and would like to make an internal link to an offline php application in my php root directory. I know I can run an application using 127.0.0.1/index.php, but I want to have a <a href=index.php>BLOG</a> or something similar in my html website and have the app run in a frame.

How do I do that?
If you want to show the page in a frame in a page, you need to first set up a frame.
The following code will create a frameset with two frames. The first sized at 25% of the page and the second at 75% of the page.
This makes two vertical (Side-by-side) frames. To create horizontal (on top of each other) frames, change "cols" to "rows"

Code: Select all

 <frameset cols="25%,75%">   <frame src="FILE NAME HERE" name="NAME OF FRAME">   <frame src="FILE NAME HERE" name="NAME OF FRAME"></frameset> 
To have a link open in a specified frame:

Code: Select all

 <a href="URL" target="NAME OF FRAME">LINK TEXT</a> 
Further Reading & References:
W3 Schools: HTML Frames - http://www.w3schools.com/Html/html_frames.asp
Page Resource: Frames 2: Linking and Attributes - http://www.pageresource.com/html/frame2.htm
Post Reply