Arkadaşlar bu kodu bi türlü hatayı çözemedım.
Amacım su dosyayı file_exists ile dosyanın varlıgını kontrol etmek eğer dosya varsa getirmek yoksa index.phpnnın gelmesnı ıstıyorum function.php get'i atadım.
Boyle kullanıcında sayfa sonsuz donguye gırıyor.
bide şoyle denedım gene olmadı
Amacım su dosyayı file_exists ile dosyanın varlıgını kontrol etmek eğer dosya varsa getirmek yoksa index.phpnnın gelmesnı ıstıyorum function.php get'i atadım.
Boyle kullanıcında sayfa sonsuz donguye gırıyor.
PHP:
$do = get("do");
if (file_exists("../test/{$do}.php")){
require("../test/{$do}.php");
} else {
require("../test/index.php");
}
bide şoyle denedım gene olmadı
PHP:
$do = $_GET["do"];
if (file_exists("../test/{$do}.php")){
require("../test/{$do}.php");
} else {
require("../test/index.php");
}