Unstoppable Domains

[Resolved] Very basic Php question

Spaceship Spaceship
Watch

baris22

Established Member
Impact
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
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
0
•••
ds2007 said:

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');        }    ?>
 
0
•••

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back