Whats the php include code that shows...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xlogger
    Confirmed User
    • Jul 2004
    • 9507

    #1

    Whats the php include code that shows...

    ...what url the surfer is currently on.

    I know for shtml its <!--#echo var="REQUEST_URI" --> but what is it for php?

    Help me out.

    ----------
    XLOGGER [REFLECTED] [OH]
  • jMEGA
    Confirmed User
    • Oct 2005
    • 671

    #2
    $_server['php_self']
    Design | SEO | Photo / Video Editing
    ( ICQ 49354667 )

    Comment

    • BoyAlley
      So Fucking Gay
      • Nov 2004
      • 19714

      #3
      All this geeky tech talk makes me hard...

      Comment

      • xlogger
        Confirmed User
        • Jul 2004
        • 9507

        #4
        Originally posted by jMEGA
        $_server['php_self']
        Nice, this works.

        <?php echo $_SERVER['PHP_SELF'] ?>

        ----------
        XLOGGER [REFLECTED] [OH]

        Comment

        • xlogger
          Confirmed User
          • Jul 2004
          • 9507

          #5
          Originally posted by BoyAlley
          All this geeky tech talk makes me hard...
          well, im actually learning this. You try it, its hard as hell.

          ----------
          XLOGGER [REFLECTED] [OH]

          Comment

          • BoyAlley
            So Fucking Gay
            • Nov 2004
            • 19714

            #6
            Originally posted by xlogger
            well, im actually learning this. You try it, its hard as hell.
            Ya I know. I was a geeky programmer for the pentagon in my former life. Wait until you start doing C++

            Comment

            • V_RocKs
              Damn Right I Kiss Ass!
              • Nov 2003
              • 32449

              #7
              Next time create a file called php.php and put
              Code:
              <? phpinfo(); ?>
              inside it.

              Next open it in a browser and scroll down to the bottom.

              All of the $_SERVER["$variables"] are there.

              Comment

              • xlogger
                Confirmed User
                • Jul 2004
                • 9507

                #8
                Originally posted by V_RocKs
                Next time create a file called php.php and put
                Code:
                <? phpinfo(); ?>
                inside it.

                Next open it in a browser and scroll down to the bottom.

                All of the $_SERVER["$variables"] are there.
                Nice, it shows the php variables!

                ----------
                XLOGGER [REFLECTED] [OH]

                Comment

                • xlogger
                  Confirmed User
                  • Jul 2004
                  • 9507

                  #9
                  Actually, $_SERVER['REQUEST_URI'] works better then $_SERVER['PHP_SELF']

                  Lets say my page is sample.php?=out.html

                  With the PHP_SELF it will only shows "sample.php"...



                  but with REQUEST_URI it will shows the whole thing - "sample.php?=out.html"

                  Last edited by xlogger; 11-26-2005, 09:42 PM.

                  ----------
                  XLOGGER [REFLECTED] [OH]

                  Comment

                  • V_RocKs
                    Damn Right I Kiss Ass!
                    • Nov 2003
                    • 32449

                    #10
                    Nice to see another brother taking a back end dive into programming his own shit ;)

                    Comment

                    • com
                      Confirmed User
                      • Aug 2003
                      • 4541

                      #11
                      Originally posted by BoyAlley
                      Ya I know. I was a geeky programmer for the pentagon in my former life. Wait until you start doing C++
                      and this is why we are teh win! OOP IS POOP!

                      Real. Professional. Hosting.
                      .:Expect Nothing Less:.
                      320-078-843 :: www.realprohosting.com :: [email protected]

                      Comment

                      • studiocritic
                        Confirmed User
                        • Jun 2005
                        • 2442

                        #12
                        Originally posted by com
                        and this is why we are teh win! OOP IS POOP!
                        you're my new hero.. fuck oop. procedural will work for the next decades as it did the last.
                        254342256

                        Comment

                        • darksoul
                          Confirmed User
                          • Apr 2002
                          • 4997

                          #13
                          Code:
                          System.out.print(Com.FormatMsg("No Shit!"));
                          1337 5y54|)m1n: 157717888
                          BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
                          Cambooth

                          Comment

                          • studiocritic
                            Confirmed User
                            • Jun 2005
                            • 2442

                            #14
                            Originally posted by darksoul
                            Code:
                            System.out.print(Com.FormatMsg("No Shit!"));
                            may you burn in hell for that.
                            254342256

                            Comment

                            Working...