Portál AbcLinuxu, 8. listopadu 2025 09:30
<?php
$host_ip = $_SERVER['REMOTE_ADDR'];
if ($host_ip == 'xx.xxx.xxx.xxx') {
secure.php;
} else {
index.php;
}
?>
Řešení dotazu:
include() a require().
<?php
$host_ip = $_SERVER['REMOTE_ADDR'];
if ($host_ip == 'xx.xxx.xxx.xxx') {
include('secure.php');
} else {
include('index.php');
}
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.