Observations regarding redirection

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

  1. #1

    Default Observations regarding redirection

    Hello,

    I don't know if it is only me but I was sure that header("Location:url")
    redirects the browser instantly to URL, or at least stops the execution of
    the code. But appearantely it continues to execute the code until the
    browser send his reply to the header instruction. So an exit(); after each
    redirection won't hurt at all


    Albert Ahtenberg Guest

  2. Similar Questions and Discussions

    1. Peculiar observations of (the CommandLine) property on OSX
      Hi all, I wrote a little application that reads and writes its own file type. I wanted to launch the projector when i double clicked on this file...
    2. ASP redirection
      Hey, I have an idea and wonder if it's possible I want to have a form page with aboot three different drop down menus. once all the options...
    3. redirection
      Thank you for your hel my question is: How can I redirect a visitor to a HTML site if he does not have flash plugin instaled on his computer? on my...
    4. Redirection Help Please
      I try to use PHP to redirect to other page and failed. Please give me a help. Thanks. The script is: if($rows_num>0) { session_start();...
    5. Interesting ! modelsUnderRay() observations
      Hi there, Interesting observations that may be of use to those using modelsUnderRay() to detect the height of a 3D mesh landscape or level...
  3. #2

    Default Re: Observations regarding redirection

    Albert Ahtenberg wrote:
    > Hello,
    >
    > I don't know if it is only me but I was sure that header("Location:url")
    > redirects the browser instantly to URL, or at least stops the execution of
    > the code. But appearantely it continues to execute the code until the
    > browser send his reply to the header instruction. So an exit(); after each
    > redirection won't hurt at all
    header('Location:xxx') simply adds the redirection as a header line at
    the top of the document. The rest of the script still continues to
    execute. Once the browser has loaded the document it reads the header
    and goes off to load the redirected page. You will need an exit() after
    such a redirection.

    Kevin Thorpe 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