��ҹ��Ǣ�͡�͹˹�� :: ��ҹ��Ǣ�ͶѴ� |
����� |
��ͤ��� |
ryuozero Site Admin
�������: 13 Jul 2005 �ͺ: 1145
|
�ͺ�����: Sun Feb 18, 2007 7:18 am ����ͧ: �Ը����͡Ե���ӧҹphp |
|
|
http://www.thaimisc.com/r/view.php?id=87&category=
�Ըա�� Redirect URL ���� PHP
��¹�� ���� , 13-01-2002
���ʴդ�Ѻ �ѹ�������й��Ըա�������� PHP 㹡�� Redirect URL 价���ҧ �Ф�Ѻ��觤����繻���ª�����ҧ�ҡ����Ѻ������ 椹�Ф�Ѻ ������ö�ٵ�����ҧ����Golf's Diary �Ф�Ѻ��觼������� code php ������������� Redirect URL ��Ѻ ��ǹ ��� code ��鹡���� � ���� � �����ͧ͢ PHP ��ԧ ��Ѻ ����Ҵ��鴢�ҧ��ҧ�ѹ��´ա��Ҥ�Ѻ
<?
header("Location: http://golf.thaimisc.com/phpnuke/html/index.php");
?>
�������¹�ç ����ѡ���� ᴧ ����� URL ����ͧ��è� Redirect 令�Ѻ ��ҹ����ҡ�����ö������� PHP �ͧ���㹡�� Redirect URL �����Ǥ�Ѻ
��¹�� : ���� |
|
���仢�ҧ�� |
|
|
ryuozero Site Admin
�������: 13 Jul 2005 �ͺ: 1145
|
�ͺ�����: Sun Feb 18, 2007 7:32 am ����ͧ: |
|
|
��÷� Redirect ���� ASP PHP ��� HTML
�������
��� ASP �յ�����ҧ�ѧ����Ѻ
<% Response.Redirect(http://www.domain.com/test/test.jsp)%>
��� PHP �յ�����ҧ�ѧ����Ѻ
<? header("Location: http://www.domain.com/html/index.php");?>
��� HTML �յ�����ҧ�ѧ����Ѻ
<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=http://www.yourname.com">
</head>
</html>
��觶����� source code ��ҧ�������������ѡ㹵��˹� document root �� Web Server ��з�������ྨ�١ redirect ��ѧ http://www.yourname.com �·ѹ�� ���Ф�Ңͧ CONTENT=0 ���ҵ�ͧ���˹�ǧ���������������ҹ��ͤ����ҧ���ҧ ��͹��� redirect ������ö������¡�á�˹���� CONTENT ����� 0
echo "<meta http-equiv='refresh' content='0;URL=news.php'>" ; |
|
���仢�ҧ�� |
|
|
|