LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   PHP server page detect (http://www.linuxquestions.org/questions/programming-9/php-server-page-detect-68838/)

radnix 06-29-2003 11:43 AM

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?

:study:menu.php index.php index2.php

lackluster 06-29-2003 11:46 AM

yup. you're screwed. why don't you just have menu after indexX? or another file dynamic_functions.php or something?

david_ross 06-29-2003 12:53 PM

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.

lackluster 06-29-2003 01:09 PM

good one. or how about some $_SERVER vars? SCRIPT_NAME might help

radnix 06-29-2003 02:27 PM

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

Thanks...............:D


All times are GMT -5. The time now is 02:35 AM.