| | |
redirecting in php
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Jul 2009
Posts: 45
Reputation:
Solved Threads: 2
i'm a newbie in php, and i know this question maybe silly 
i tried to create a php file that will redirect to yahoo.com.
i have searched in google, and i found that the code should be
but i found that it didn't work.
anyone has clue about this?
does the version of php affect it?

i tried to create a php file that will redirect to yahoo.com.
i have searched in google, and i found that the code should be
PHP Syntax (Toggle Plain Text)
<?php header('Location:http://www.yahoo.com ?>
but i found that it didn't work.
anyone has clue about this?
does the version of php affect it?
•
•
Join Date: Jul 2009
Posts: 45
Reputation:
Solved Threads: 2
0
#2 22 Days Ago
sorry, i meant
header('Location:http://www.yahoo.com');
header('Location:http://www.yahoo.com');
•
•
Join Date: Oct 2009
Posts: 4
Reputation:
Solved Threads: 1
0
#7 21 Days Ago
•
•
•
•
yes, i have installed wamp server, included apache, php, and mysql in it. the version of the php is 5.2.5, so i don't think that it's because the version of the php. thanks for your response.
Can you please right click on the page, choose "view source" and paste the contents here?
•
•
Join Date: Jul 2009
Posts: 45
Reputation:
Solved Threads: 2
0
#8 21 Days Ago
here is the code
and the address is still at "file:///C:/Program%20Files/wamp/www/Projek%20SBD/Projek/logout.php" (NB : logout.php is the name of the file that contains that code)
i'm using mozilla firefox, version 3.0.15.
thanks for your response.
PHP Syntax (Toggle Plain Text)
<? header("location:index.html"); ?>
and the address is still at "file:///C:/Program%20Files/wamp/www/Projek%20SBD/Projek/logout.php" (NB : logout.php is the name of the file that contains that code)
i'm using mozilla firefox, version 3.0.15.
thanks for your response.
•
•
Join Date: Oct 2009
Posts: 4
Reputation:
Solved Threads: 1
0
#9 21 Days Ago
•
•
•
•
here is the code
PHP Syntax (Toggle Plain Text)
<? header("location:index.html"); ?>
and the address is still at "file:///C:/Program%20Files/wamp/www/Projek%20SBD/Projek/logout.php" (NB : logout.php is the name of the file that contains that code)
i'm using mozilla firefox, version 3.0.15.
thanks for your response.
your URL should be something like:
PHP Syntax (Toggle Plain Text)
http://localhost/Projek%20SBD/Projek/logout.php
If you open the file itself, the PHP code doesn't run. The browser simply displays the content of the file...
![]() |
Other Threads in the PHP Forum
- Previous Thread: session in php
- Next Thread: Multiple file upload through an array
| Thread Tools | Search this Thread |
301 access apache api array autocomplete beginner binary broken button cakephp checkbox class cms code compression cron curl data database dataentry date display dropdown dropdownlist duplicates dynamic echo email error execution file files folder form forms freelancing function functions google href htaccess html htmlspecialchars httppost image include insert integration ip javascript joomla jquery limit link links login mail md5 menu methods mlm multiple mysql oop paypal pdf pdfdownload php phpvotingscript query radio random remote script search secure server session sessions source space sql subscription syntax system table tutorial tutorials update upload url validator variable video virus volume votedown web youtube





