Auto Append to only PHP Files
Moderator: General Moderators
- tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida
Auto Append to only PHP Files
How can I set PHP to only append .php files? I dont have access to php.ini, only .htaccess 
- tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida
- tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida
I included filetype.php on the header.php page. You can see below:
header.php wrote:Code: Select all
<?php require_once("filetype.php"); if(isset($allow_p35TraNE) && ($allow_p35TraNE==1)){ require_once("header_add.php"); } ?>
filetype.php wrote:Code: Select all
<?php // Allow Extentions: $allowed_p35TraNE = array(".php",".htm",".html"); $file_type_s4EphAde = __FILE__; $file_type_s4EphAde = basename($file_type_s4EphAde); $file_type_s4EphAde = strtolower(strrchr($file_type_s4EphAde, '.')); if(in_array($file_type_s4EphAde, $allowed_p35TraNE)){ $allow_p35TraNE = 1; } else { $allow_p35TraNE = 0; } ?>
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida