PHP İstek.SorgulamaDizesi - koşullar emin değilim ile $ _GET nasıl

0 Cevap

Ben php ile aşina değilim ve (üzerinde çalışıyorum sunucu asp desteklemiyor) php kullanarak bir yönlendirme komut dosyası yazmak istiyorum

Ben böyle bir şey olması gerektiğini düşünüyorum

<?php if ($_GET[id]; == 'test') {echo '<meta http-equiv="refresh" content="0;URL=http://www.test.com" />'} ?>

I [(3)] ardından sayfa http://www.test.com veya http://www.domain.com?id=example gibi bir sorgu yönlendirmelidir ve {yönlendirme konuşulmalıdır http://www.domain.com?id=test gibi bir sorgu dizesi göndermek istiyorum }

Javascript ve klasik asp ben böyle yapardı kullanma:

<% if (Request.QueryString("id") == 'test') { %><meta http-equiv="refresh" content="0;URL=http://www.test.com" /><% } %>
<% if (Request.QueryString("id") == 'example') { %><meta http-equiv="refresh" content="0;URL=http://www.theexamplesite.com" /><% } %>

Bana yardım eder!

Teşekkürler

0 Cevap