B baris22 Established Member ★ 15 ★ Impact 1 Nov 7, 2007 621 views 2 replies #1 Very basic php question Hello all, I need to do this. If page is index.php i want to include a.php if the page is contact.php i want to include b.php how can i do this? I am only using 1 page code Thank you all
Very basic php question Hello all, I need to do this. If page is index.php i want to include a.php if the page is contact.php i want to include b.php how can i do this? I am only using 1 page code Thank you all
D ds2007 Established Member ★ 15 ★ Impact 6 Nov 7, 2007 #2 this might help you http://kr2.php.net/include/
B baris22 Established Member ★ 15 ★ Impact 1 Nov 7, 2007 #3 ds2007 said: this might help you http://kr2.php.net/include/ Click to expand... I already checked there. There is no sample to match my need. thanks ok. sorted. PHP: <?php $homepage = "/index.php"; $currentpage = $_SERVER['REQUEST_URI']; if($homepage==$currentpage) { include('homepage-ads.php'); } ?>
ds2007 said: this might help you http://kr2.php.net/include/ Click to expand... I already checked there. There is no sample to match my need. thanks ok. sorted. PHP: <?php $homepage = "/index.php"; $currentpage = $_SERVER['REQUEST_URI']; if($homepage==$currentpage) { include('homepage-ads.php'); } ?>