[PHP] get current path

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default [PHP] get current path

    Hi,

    The PHP site seems to be down right now ... so here's the question: Is it
    possible for PHP to tell me the current path of a page? For example:
    [url]www.whatever.com/this/page.php[/url] - I'd like PHP to return /this/page.php ...
    is that possible and if so, how so?

    TIA
    -Tim


    Tim Thorburn Guest

  2. Similar Questions and Discussions

    1. Finding the current path
      Octavian Rasnita wrote: Use the standard Cwd module.
    2. current path
      Hello together, how can I find the current path my Perlscript is started ? Jochen
    3. #25444 [Bgs->Opn]: php4isapi.dll path to win.ini doesn't load from current path.
      ID: 25444 User updated by: ict at primus dot ca Reported By: ict at primus dot ca -Status: Bogus +Status: ...
    4. #25444 [Opn->Bgs]: php4isapi.dll path to win.ini doesn't load from current path.
      ID: 25444 Updated by: sniper@php.net Reported By: ict at primus dot ca -Status: Open +Status: Bogus...
    5. #25444 [NEW]: php4isapi.dll path to win.ini doesn't load from current path.
      From: ict at primus dot ca Operating system: W2K PHP version: 4.3.3 PHP Bug Type: *Configuration Issues Bug description: ...
  3. #2

    Default Re: [PHP] get current path

    >The PHP site seems to be down right now ... so here's the question: Is
    >it possible for PHP to tell me the current path of a page? For example:
    >[url]www.whatever.com/this/page.php[/url] - I'd like PHP to return /this/page.php
    >... is that possible and if so, how so?
    PHP site looks up to me, though I have been having intermittent
    difficulties recently with one of the servers - us4 I think.

    To get the current path of the page or other webserver-related
    environmental informatio, check the contents of the $_SERVER superglobal
    and all will be revealed.

    ---------------------------------------------------------------------
    michal migurski- contact info and pgp key:
    sf/ca [url]http://mike.teczno.com/contact.html[/url]

    Mike Migurski Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139