943,169 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 384
  • PHP RSS
Sep 2nd, 2010
0

Redirecting to parent directory

Expand Post »
Hi,

I want my script to redirect the visitor to the another script which is in another folder under the same parent directory. And i cannot use the "header()" redirect method.

Quote ...
/www/index.php/ (where i want the visitor to be redirected to)
Quote ...
/www/upload/upload.php/ (where i want the visitor to be redirected from)
Here is what i have so far:

PHP Syntax (Toggle Plain Text)
  1. <?php
  2.  
  3. echo '<META HTTP-EQUIV="Refresh" Content="0; URL="../index.php">';
  4.  
  5. ?>
Last edited by marvolo1300; Sep 2nd, 2010 at 9:32 pm.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
marvolo1300 is offline Offline
18 posts
since Aug 2010
Sep 2nd, 2010
1
Re: Redirecting to parent directory
try this one instead

<?php

echo '<META HTTP-EQUIV="Refresh" Content="0; URL="../../index.php">';

?
Reputation Points: 26
Solved Threads: 31
Posting Whiz
MooGeek is offline Offline
349 posts
since Mar 2009
Sep 2nd, 2010
0
Re: Redirecting to parent directory
I fixed it. I put the quotation in the wrong place. Here's the older code

PHP Syntax (Toggle Plain Text)
  1. <?php
  2. echo '<META HTTP-EQUIV="Refresh" Content="3; URL="../index.php">';
  3.  
  4. ?>

Here's the revised one:

PHP Syntax (Toggle Plain Text)
  1. echo '<META HTTP-EQUIV="Refresh" Content="3; URL=../index.php">';
Reputation Points: 10
Solved Threads: 0
Newbie Poster
marvolo1300 is offline Offline
18 posts
since Aug 2010
Sep 2nd, 2010
0
Re: Redirecting to parent directory
TY britoniah3480 your way works as well.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
marvolo1300 is offline Offline
18 posts
since Aug 2010
Sep 2nd, 2010
0
Re: Redirecting to parent directory
Ok no problem! Anytime!
Reputation Points: 26
Solved Threads: 31
Posting Whiz
MooGeek is offline Offline
349 posts
since Mar 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: help please
Next Thread in PHP Forum Timeline: Is It Possible To Create An "adult Content Filter" In Php?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC