Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #5035
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!news.glorb.com!news-out.readnews.com!transit3.readnews.com!nx02.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!spln!extra.newsguy.com!newsp.newsguy.com!news6 |
|---|---|
| From | crankypuss <no@email.thanks> |
| Newsgroups | comp.lang.php |
| Subject | Re: Name of page itself? |
| Date | Tue, 28 Feb 2012 03:23:18 -0700 |
| Organization | NewsGuy - Unlimited Usenet $19.95 |
| Lines | 23 |
| Message-ID | <jii9uo01teb@news6.newsguy.com> (permalink) |
| References | <29234465-827c-4372-9dc7-d9322fb4703e@m2g2000vbc.googlegroups.com> |
| NNTP-Posting-Host | p023a5cbce981b86f289a93aa3e43d71a57d95435ac4ed680.newsdawg.com |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| User-Agent | Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 |
| In-Reply-To | <29234465-827c-4372-9dc7-d9322fb4703e@m2g2000vbc.googlegroups.com> |
| X-Received-Bytes | 1619 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.php:5035 |
Show key headers only | View raw
On 02/28/2012 02:58 AM, Sonnich Jensen wrote: > Hi > > I have not worked with PHP for 2+ years, now again and need to refill > my brain... > > How can I get the name of the main page? > > Say, index.php includes menu.php, how do I get the name of the main > page, in this case index.php? > Next say page1.php, page2.php etc? > > Sonnich There is really no way to answer that question in an absolute sense, for example the "main page" for my web code is "index.php" and *everything* goes through that. If you're working with the usual stuff out of the box, you can use phpinfo() to see which variable you'd like to use to figure out what you're dealing with... look at things like $_SERVER["DOCUMENT_ROOT"], $_SERVER["SCRIPT_FILENAME"], $_SERVER["SCRIPT_NAME"], $_SERVER["PHP_SELF"] for starters.
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Name of page itself? Sonnich Jensen <sonnichjensen@gmail.com> - 2012-02-28 01:58 -0800
Re: Name of page itself? tdk2fe <tdkrupinski@gmail.com> - 2012-02-28 02:14 -0800
Re: Name of page itself? crankypuss <no@email.thanks> - 2012-02-28 03:23 -0700
Re: Name of page itself? bill <nobody@spamcop.net> - 2012-02-28 08:50 -0500
Re: Name of page itself? Scott Johnson <noonehome@chalupasworld.com> - 2012-03-01 06:02 -0800
Re: Name of page itself? Captain Paralytic <paul_lautman@yahoo.com> - 2012-03-01 03:16 -0800
Re: Name of page itself? Tim Streater <timstreater@greenbee.net> - 2012-03-01 12:15 +0000
Re: Name of page itself? The Natural Philosopher <tnp@invalid.invalid> - 2012-03-01 12:57 +0000
Re: Name of page itself? Paul Herber <paul@pherber.com> - 2012-03-01 13:54 +0000
Re: Name of page itself? Paul Herber <paul@pherber.com> - 2012-03-01 13:59 +0000
Re: Name of page itself? The Natural Philosopher <tnp@invalid.invalid> - 2012-03-01 14:06 +0000
Re: Name of page itself? Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-01 10:05 -0500
Re: Name of page itself? Scott Johnson <noonehome@chalupasworld.com> - 2012-03-01 06:04 -0800
Re: Name of page itself? The Natural Philosopher <tnp@invalid.invalid> - 2012-03-01 14:10 +0000
Re: Name of page itself? Tim Streater <timstreater@greenbee.net> - 2012-03-01 17:05 +0000
Re: Name of page itself? Scott Johnson <noonehome@chalupasworld.com> - 2012-03-01 15:28 -0800
Re: Name of page itself? Tim Streater <timstreater@greenbee.net> - 2012-03-01 17:01 +0000
Re: Name of page itself? Arno Welzel <usenet@arnowelzel.de> - 2012-03-02 18:31 +0100
Re: Name of page itself? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-03-01 13:01 +0100
Re: Name of page itself? Denis McMahon <denismfmcmahon@gmail.com> - 2012-03-01 15:23 +0000
csiph-web