Exclduing an include from a specific file?

Hi, all,

I have a segment of code I would like to exclude from a specific file. In this instance it would be the file located @: includes/mailhive.php

The code I have is here:

[php]if(EMAIL_USE_PHPMAILER == ‘true’)
{
require_once(DIR_WS_CLASSES . ‘phpmailer/class.phpmailer.php’);
}[/php]

How can I properly exclude this function or require_once from happening if the page loaded in the browser is includes/mailhive.php? I assume PHP_SELF may work in some form or fashion, but as simple as this may be I’m bashing my head!

Thanks for any help!

I think i would just make a if statement

[php]if (isset($var) ) {
do nothing
}else{
include(file);
}

// add to the file you do not want it included
$var =‘no include’;

[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service