![]() Preserved Topic: What's the PHP equivelant of DOCUMENT_URI? (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() I'm trying to determine the file name of a .php file from within that same php file (determine it's own file name). |
Nervous Wreck (II) Inmate From: Canada |
![]() $PHP_SELF |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() $PHP_SELF (variable) - The filename of the currently executing script, relative to the document root. If PHP is running as a command-line processor, this variable is not available. |
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() Oh, I hadn't read about basename() yet. That makes it easier. I was using: |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() I don't know how your concept for that web site looks like, but I would suggest you to put all common parts of code as functions in one big library which you will include at the top of each file. Also, you don't need to use so many variables. Here's more compact version of that code: |
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() Ahhh...ok. I was trying to combine the different commands together, but couldn't quite get it. |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() |
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() Aha! Sooner or later I would have needed to know that. |
Paranoid (IV) Inmate From: New Jersey, USA |
![]() Hey Pugzly |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() I like this one |
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() The first one was PHP for the World Wide Web - A Visual Quickstart Guide. It's by Larry Ullman and put out by Peachpit Press. I read most of the 267 pages. |
Paranoid (IV) Inmate From: New Jersey, USA |
![]() Thanks Pugzly and Bitdamaged for the book recommendations. There are so many of them on the subject, that I never really know which ones are worth purchasing. I'm much more comfortable buying them after a thumbs up from you guys. |
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() Yeah, PHP docs are pretty good. In fact, if you go to http://www.php.net, you can download a Windows Help file version of the PHP manual. I love that. It makes looking up things SO much easier. |