Page 1 of 1

How do I insert a .php into my html page?

Posted: Thu Feb 05, 2004 3:06 am
by Sexy Gal
How do I insert a .php into my html page?

Do you need to put it into a table. I'm not sure what to so.

I'm using Frontpage 98.

Posted: Thu Feb 05, 2004 3:31 am
by andylyon87
You could use:

Code: Select all

<?php
require(filename.php);
?>
This should be inserted where you want the page to appear. You would need to replace the filename with the appropriate name.

Posted: Thu Feb 05, 2004 3:45 am
by Sexy Gal
Didnt work :(

Posted: Thu Feb 05, 2004 5:16 am
by twigletmac
You also need to have PHP set up on a webserver and need to use the correct extension for the file - normally for PHP it is .php.

Mac

Posted: Thu Feb 05, 2004 11:07 am
by andylyon87
Sorry I took for granted that you had a php server. You can go to http://www.easyphp.org/telechargements.php3, download v1.7 (10mb) and this way you can run a virtual server on your computer and it won't cost you a thing. I use it all the time it works perfect. It's a french program but there are updates which convert the instructions to English or whatever. If you need the english conversion you can go to the same site and download the local pages.

Posted: Thu Feb 05, 2004 11:24 am
by Sexy Gal
I do have a php server..

Here's my link..
http://www.sch-county.com/testbeta/Auto ... oIndex.php?

What I want to do is put this autoindex.php in the middle of a web page.

Can ya help a lady out? :)

Posted: Thu Feb 05, 2004 11:32 am
by kettle_drum
Just make the page, then where you want to insert the php page do:

<?php
include("autoindex.php");
?>

And it will be included. You then must save this page with an extension that the server knows it should parse for php - generally .php or .php3 - and then your done.

So your page is likely to be called something like: index.php and that will include the autoindex.php page in it.

Posted: Thu Feb 05, 2004 11:50 am
by Sexy Gal
Hmmm, tried that also.. Doesnt seem to work for me. I have to be doing something wrong.

Can you give me an example?

Posted: Thu Feb 05, 2004 11:57 am
by andylyon87
do you want the page in amongst other php elements

Posted: Thu Feb 05, 2004 12:17 pm
by ol4pr0
Maby its better if you give a piece of the code you have now.. to see what youre doing wrong.


Like kettle_drum said. youre extensions do have to be php/ php3 of them pages you are including something.

Code: Select all

<?php
include("somepage.php");

// or

include ("footer.php");
include ("header.php");

// should do it.
?>