Page 1 of 1

include files

Posted: Wed Oct 13, 2004 12:20 am
by C_Calav
hi guys,

just been at tech and we are doing a project in asp, (HAVE to do a project in asp, crappy i know) and im in a small team. now the lady wrote some code today and she used a include file menu.inc for the menu. now this menu was generic across all pages. it was a good idea as it was helpful for my webpage. so i did a bit of googling and it seems its only for asp? is this correct?

all i want to do is put my nav in a include file and include it on my html/php pages.

can i do this and what is the include file code for this.

i have used include files in php (connection file etc) but not for html for example a menu.

thanx!

Posted: Wed Oct 13, 2004 12:42 am
by harsha
use any asp2php convertor and convert the asp code to php
or include it remotely.

include_once("http://www.somesite.com/nav.asp");
and do some manipulations

enable ASP tags <% %> Tags in php.ini and try it

Posted: Wed Oct 13, 2004 2:49 am
by phpScott
also make sure that the webserver you are using can interpret asp pages otherwise there is not poing in doing the second suggestion.

if the asp file is just providing the menu structure then it will be fine to use as long as the links are correct for your php pages.
I find that when redirecting from asp to php pages or vice versa that the GET method is best. IMHO.

Posted: Wed Oct 13, 2004 3:58 am
by twigletmac
You can include HTML just as easily as a connection file:

Code: Select all

include 'mymenu.inc.php';
Mac

Posted: Wed Oct 13, 2004 4:28 am
by C_Calav
thanx guys for your replys!

ill try some of those methods out tomorow.

my website i want to use the include files for is at home and it is done all in php.

sorry if anyone got confussed.. or if i am.

but why would i need asp tags in my php code for include files?

cheers!

Posted: Wed Oct 13, 2004 2:44 pm
by timvw
from my bookmarks:

http://asp2php.naken.cc/

:)