LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 06-29-2003, 11:43 AM   #1
radnix
Member
 
Registered: Aug 2002
Location: Huntsville AL
Distribution: redhat 7.3
Posts: 48

Rep: Reputation: 15
PHP server page detect


Condition :

server pages assembled in this order-

header.php
menu.php
index.php
footer.php

next page -

header.php
menu.php
index2.php
footer.php

Does anyone know a way for menu.php to detect which 'index.php or index2.php' is being used so that I can dynamically modify the functions in 'menu.php' ?

Is it that since menu.php comes before index and index2 its not possible?

menu.php index.php index2.php

Last edited by radnix; 06-29-2003 at 11:45 AM.
 
Old 06-29-2003, 11:46 AM   #2
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Rep: Reputation: 30
yup. you're screwed. why don't you just have menu after indexX? or another file dynamic_functions.php or something?
 
Old 06-29-2003, 12:53 PM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
I don;t know how you are assmbling the pages as you don't state it but what about passing a query string to the script.
 
Old 06-29-2003, 01:09 PM   #4
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Rep: Reputation: 30
good one. or how about some $_SERVER vars? SCRIPT_NAME might help
 
Old 06-29-2003, 02:27 PM   #5
radnix
Member
 
Registered: Aug 2002
Location: Huntsville AL
Distribution: redhat 7.3
Posts: 48

Original Poster
Rep: Reputation: 15
$_SERVER vars

$_SERVER vars, yes!!!! that'll do it!

Thanks...............
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
php page will not load kaplan71 Linux - Software 6 09-11-2004 07:37 AM
Reloading page with php emilioestevezz Programming 1 09-07-2004 04:40 PM
I cant change the default test page in apache server to add my page.y nhemapriya Linux - Newbie 3 05-13-2004 12:35 PM
PHP should ignore a missing page. linuxfond Programming 4 01-29-2004 09:53 AM
Setting a web page with php! mithras Linux - General 14 07-25-2003 03:25 PM


All times are GMT -5. The time now is 10:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration