GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   need little php help (https://gfy.com/showthread.php?t=139304)

deleteduser 06-02-2003 03:15 PM

need little php help
 
i have a website with a head part (logo etc) and a navigation on the left and the main stuff in the center.

i want to have the head + navigation saved somewhere and add it to every page automaticly. that will make it alot easiert to change the navigation later. i don't want to edit 1000 html files.

can anybody help me there? if so, email me to [email protected] or post here! thanks!

XxXotic 06-02-2003 03:17 PM

make individual head and menu files call with ssi perhaps?

deleteduser 06-02-2003 03:18 PM

will do that if you tell me how :)

swedguy 06-02-2003 03:19 PM

Save your header as header.html and your navigation as nav.html

Then you add this where your header is supposed to be:
< ? include("header.html") ? >

and this where your navigation is supposed to be:
< ? include("nav.html") ? >


(Delete the space inbetween < and ?)

Calvinguy 06-02-2003 03:20 PM

With php use include or require.

Use the manual: http://www.php.net/manual/

michaelw 06-02-2003 03:20 PM

<.? include("file.txt"); ?.>

file.txt contains ur html

foe 06-02-2003 03:20 PM

Quote:

Originally posted by swedguy
Save your header as header.html and your navigation as nav.html

Then you add this where your header is supposed to be:
< ? include("header.html") ? >

and this where your navigation is supposed to be:
< ? include("nav.html") ? >


(Delete the space inbetween < and ?)

This is the simplest way to go.

iroc409 06-02-2003 03:21 PM

can you run SSI and PHP on the same page?

michaelw 06-02-2003 03:21 PM

Quote:

Originally posted by swedguy
Save your header as header.html and your navigation as nav.html

Then you add this where your header is supposed to be:
< ? include("header.html") ? >

and this where your navigation is supposed to be:
< ? include("nav.html") ? >


(Delete the space inbetween < and ?)

youre missing the ;
< ? include("nav.html"); ? >

iroc409 06-02-2003 03:23 PM

duh, you can't... unless i guess you include a php file in the ssi... then that might work. hmm...

Why 06-02-2003 03:25 PM

the include is a php function :)

Why 06-02-2003 03:26 PM

so yes you can include php in it. it will be interperate the php thats in the include.

deleteduser 06-02-2003 03:39 PM

i use the php thing now and it works exellent!
gfy at its best! took not even 5 minutes to solve my problem!

you guys rock :thumbsup

boldy 06-02-2003 03:40 PM

i can help... hit me up 13605110

swedguy 06-02-2003 03:41 PM

Quote:

Originally posted by michaelw


youre missing the ;
< ? include("nav.html"); ? >

Doesn't matter if you just have one line.

iroc409 06-02-2003 03:52 PM

Quote:

Originally posted by Why
the include is a php function :)

ahh... ok, i thought php used something else :) i still don't do a lot of php :)


All times are GMT -7. The time now is 09:25 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123