bu Kod PHP 5.3 çalışır, ancak PHP 5.4> Hata Bildirimi içinde: Undefined index:
sizin error_reporting ayarına bağlıdır//station
$station = $_GET['station'];
if (!$station)
$station = 'main';
//base path
bu Kod PHP 5.3 çalışır, ancak PHP 5.4> Hata Bildirimi içinde: Undefined index:
sizin error_reporting ayarına bağlıdır//station
$station = $_GET['station'];
if (!$station)
$station = 'main';
//base path
ancak gerektiği her zaman 'istasyon' zaten www.example.com?station=piccadily
if (isset($_GET['station']) && $station = $_GET['station'])
else $station = 'main;
gibi http (s) aracılığıyla kurulmuştur olmadığını kontrol veya bir basitleştirmeye:
$station = isset($_GET['station']) ? $_GET['station'] : 'main';
PHP7 beri kaynaşabilecek operatörüyle yazabilirsiniz:
$station = $_GET['station'] ?? 'main';
<?php
$station = $_GET['station'];
error_reporting(0);
if (isset ($station)) :
$station = 'main';
else :
$action = 'null';
endif;
?>
aynı Player Kod 1 Sunucu Centos 6.7 PHP 5.3 http://195.154.68.186/ 2. Sunucu Centos 7 PHP 5.4 http çalışır: //37.59.14.143/player/index.php swf dosyasını yüklemiyor – Ambassador
Bu kodu anlamıyorum, b/c ikinci satırda aynı bildirimi alacaksınız, eğer error_reporting ALL (0) olarak ayarlanmışsa kodu yürütmek. $ Eylem nedir? –
Tom K. isterseniz size senaryoyu gönderebilirim. – Ambassador