CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2010
    Posts
    111

    Unhappy Redirect problem in the php

    Hi

    i have three folders ,

    example: first folder,second folder, third folder

    now i m using third folder file , i want to access the second folder function so i included that function then redirect to the first folder file , at that time i could not access the session variable.

    it show as null value. any one help me to solve this problem.

    if we redirect to the any folder which reside out the root means ,the session will expires ?

    Thanks
    sona

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: Redirect problem in the php

    Without seeing any code, there's no way we could know what you're trying to explain.

    Please remember to use PHP tags.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Jan 2011
    Location
    Morocco
    Posts
    17

    Re: Redirect problem in the php

    Please post your source code or provide more info in order to get ur point

    PHP Code:
    <?php
    $echo
    ="Your Folder Path Here"
    ?>
    <html><head>
    <meta HTTP-Equiv="refresh" content="0; URL=<?echo $echo; ?>">
    <script type="text/javascript">
    echo = "<?echo $echo; ?>"
    self.location.replace(echo);
    window.location = echo;
    </script>
    </head>
    Last edited by PeejAvery; May 21st, 2011 at 12:58 PM. Reason: Added PHP tags

  4. #4
    Join Date
    May 2002
    Posts
    10,943

    Re: Redirect problem in the php

    Anoir, why would you use PHP to echo to the client-side for a redirect when a server-side redirect is faster? That makes no sense.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  5. #5
    Join Date
    Jan 2011
    Location
    Morocco
    Posts
    17

    Re: Redirect problem in the php

    Well it is just an example and safe

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured