R rombeca Registered 10 Ноември 2009 #1 Значи правя си файл : Код: <?php switch ($i) { case "1": include ("1.php"); break; case "2": include ("2.php"); break; } ?> Как от друг файл да извикам case 1 или case 2, че нещо много се омотах?
Значи правя си файл : Код: <?php switch ($i) { case "1": include ("1.php"); break; case "2": include ("2.php"); break; } ?> Как от друг файл да извикам case 1 или case 2, че нещо много се омотах?
E emagi Registered 10 Ноември 2009 #2 http://web-tourist.net/forum/viewtopic.php?t=57068&highlight=case http://web-tourist.net/forum/viewtopic.php?t=56938&highlight=case
http://web-tourist.net/forum/viewtopic.php?t=57068&highlight=case http://web-tourist.net/forum/viewtopic.php?t=56938&highlight=case
E emagi Registered 10 Ноември 2009 #3 test.php <?php if(isset($_GET['i'])){ switch ($_GET['i']) { case "1": include ("1.php"); break; case "2": include ("2.php"); break; } } else { echo "<a href='?i=1'>Case 1</a><br />"; echo "<a href='?i=2'>Case 2</a><br />"; } ?> Увеличете...
test.php <?php if(isset($_GET['i'])){ switch ($_GET['i']) { case "1": include ("1.php"); break; case "2": include ("2.php"); break; } } else { echo "<a href='?i=1'>Case 1</a><br />"; echo "<a href='?i=2'>Case 2</a><br />"; } ?> Увеличете...