2016-04-15 5 views
1

ich schreibe nur einfache bedingte und seine Arbeit nicht ...Einfache, wenn die Bedingung mit strpos arbeiten nicht

$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; 
if (strpos($actual_link, 'download/gra') !== false) { 
     if (strpos($actual_link, 'android.html') !== false) { 
      echo 'TAK TO JEST GRA! A na dodatek na akdroida :)'; 
     } else if (strpos($actual_link, 'ios.html') !== false) { 
      echo 'wykrylem ze to gra na ios!'; 
     } else { 
      echo = 'O KURWA MAĆ[email protected] KTOS KORZYSTA Z WYSZUKIWARKI ALBO INENGO MOEJSCA O KTORYM NIE WIEM :O'; 
     } 
} else { 
    echo 'NIE POSIADa i to jest apliakcja!'; 
} 

Aber wenn ich diese nur verwenden:

$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; 
if (strpos($actual_link, 'download/gra') !== false) { 
      echo 'TAK TO JEST GRA! A na dodatek na akdroida :)'; 
} else { 
    echo 'NIE POSIADa i to jest apliakcja!'; 
} 

Adaequat

+0

Was meinst du mit funktioniert nicht? Erhalten Sie irgendwelche Fehler? – Aziz

Antwort

1

Diese Zeile ersetzen

echo = 'O KURWA MAĆ[email protected] KTOS KORZYSTA Z WYSZUKIWARKI ALBO INENGO MOEJSCA O KTORYM NIE WIEM :O'; 

von th ist:

echo 'O KURWA MAĆ[email protected] KTOS KORZYSTA Z WYSZUKIWARKI ALBO INENGO MOEJSCA O KTORYM NIE WIEM :O'; 

Ich meine: Entfernen Sie einfach das Zeichen =.