ciao ragazzi
è corretto come uso dello swich?![]()
....
$bot = ($_SERVER['HTTP_USER_AGENT']);
switch ($bot)
{
case 'Yandex':
$nomefile = "Yandex.txt";
.....
grazie a chi mi risponde
ciao ragazzi
è corretto come uso dello swich?![]()
....
$bot = ($_SERVER['HTTP_USER_AGENT']);
switch ($bot)
{
case 'Yandex':
$nomefile = "Yandex.txt";
.....
grazie a chi mi risponde
si....è corretto........devi mettere i break; pero, dopo ogni blocco di istruzioni delle switch
V.I.S.T.A. --> Virus Inside, Switch To Apple
Magari scrivilo meglio$bot = ($_SERVER['HTTP_USER_AGENT']);
switch ($bot)
{
case 'Yandex':
$nomefile = "Yandex.txt";
.....
Codice PHP:
switch ($bot)
{
case 'Yandex':
$nomefile = "Yandex.txt";
.... operazioni ...
.... altre operazioni ...
break;
default:
echo "Caso default";
break;
}