[Resolved] Very basic Php question

SpaceshipSpaceship
Spacemail by SpaceshipSpacemail by Spaceship
SpaceshipSpaceship
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
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
0
Close
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
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back