You are here: Get the path to a "parent" script? « PHP SQL « IT news, forums, messages
Get the path to a "parent" script?

Posted by Bonge Boo! on 10/22/05 16:21

I hope this is easy. I'm trying to move a load of code out from the "parent"
page into includes to make things a bit tidier.

I make a variable called $target from the $_SERVER[SCRIPT_NAME]; I then use
$target in a function run some tests against an array, if they match they do
some conditional code to make a navigation bar.

I thought I would be able to make $target a globalvariable so my include
scripts could then access it and use its value. However this didn't work.
Might be me being thick.

So the next approach would be to have the includes able to know what the
"parent" file was called, and then I could use that. Reading the manual
hasn't thrown up an obvious functions or global variables.

Anyone? Do I need to go back and find out why my global variable wasn't
working?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация