[PHP] Re: [BULK] [PHP] Redirecting to a parent page

2007-06-13 Thread clive

Yamil Ortega wrote:


Lets say that I have the next structure on my web directory
/file1.php

/procces/file2.php

/file3.php


 http://localhost/apache2/file1.php

try this:

header( refresh:'3'; url=./apache2/file3.php);

Regards,

Clive.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: [BULK] [PHP] Redirecting to a parent page

2007-06-13 Thread Yamil Ortega
Ok, but what happens if I change server and there is no more apache2
directory?

Do I have to change all the headers in my 37 web pages?

Thanks in advance
Yamil

-Mensaje original-
De: clive [mailto:[EMAIL PROTECTED] 
Enviado el: MiƩrcoles, 13 de Junio de 2007 05:37 a.m.
Para: PHP General List
Asunto: [PHP] Re: [BULK] [PHP] Redirecting to a parent page

Yamil Ortega wrote:

 Lets say that I have the next structure on my web directory
 /file1.php
 
 /procces/file2.php
 
 /file3.php

  http://localhost/apache2/file1.php

try this:

header( refresh:'3'; url=./apache2/file3.php);

Regards,

Clive.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: [BULK] [PHP] Redirecting to a parent page

2007-06-13 Thread Darren Whitlen

Yamil Ortega wrote:

Ok, but what happens if I change server and there is no more apache2
directory?

Do I have to change all the headers in my 37 web pages?


The same code in 37 pages??? Place the code in 1 page, and use 
require(my_code_page.php); where you need it in your scripts. You will 
only then have to change it in one place.


Darren



Thanks in advance
Yamil

-Mensaje original-
De: clive [mailto:[EMAIL PROTECTED] 
Enviado el: MiƩrcoles, 13 de Junio de 2007 05:37 a.m.

Para: PHP General List
Asunto: [PHP] Re: [BULK] [PHP] Redirecting to a parent page

Yamil Ortega wrote:


Lets say that I have the next structure on my web directory
/file1.php

/procces/file2.php

/file3.php


  http://localhost/apache2/file1.php

try this:

header( refresh:'3'; url=./apache2/file3.php);

Regards,

Clive.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Redirecting to a parent page

2007-06-13 Thread Richard Lynch
On Wed, June 13, 2007 11:12 pm, Yamil Ortega wrote:
 Lets say that I have the next structure on my web directory

 /file1.php

 /procces/file2.php

 /file3.php

 So, when I see the file1.php on the browser I  see the page in this
 route

 http://localhost/apache2/file1.php

  I have a button that sends information to the /process/file2.php.
 When the
 process is finished, I have to come back to the parent directory page.

 Im using this instruction

 header( refresh:'3'; url=./file3.php);

You need a COMPLETE url here, not just relative pathname, almost for
sure.

 But I got the error that in http://localhost/file3.php does not exists
 any
 page

 If I use this

 header( refresh:'3'; url=file3.php);

 I got the error that in http://localchost/procces/file3.php does not
 exists

 So, how can I redirect the file2.php to the file3.php in the parent
 directory?

You also should consider just doing:
include('file3.php');
instead of bouncing the user back-and-forth between the server/client
in slow HTTP connnections...

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [BULK] RE: [PHP] Re: [BULK] [PHP] Redirecting to a parent page

2007-06-13 Thread clive

Yamil Ortega wrote:

Ok, but what happens if I change server and there is no more apache2
directory?

Do I have to change all the headers in my 37 web pages?



do this:

// in a config file, or header file
$sitename = http:/localhost/apache2/; eader file

// whereever it is needed
header(Location: $sitename/file3.php);

You may also want to look at the object buffer and perhaps clear that 
before doing a redirect.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php