Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [MJB] hiding php from cgi (perl): Edit Log

Here is the list of edits for this post
Re: [MJB] hiding php from cgi (perl)
Hi,

Give this a go:

check_if_is_script
Code:
sub {
$ENV{SCRIPT_NAME} ? return { is_script => 1 } : return { is_script => 0 };
}

Then, instead of just using:

Code:
<%run_php("/path/to/your/script.php")%>

Try using:

Code:
<%check_if_is_script%>
<%if is_script%>
<%run_php("/path/to/your/script.php")%>
<%else%>
..show your normal PHP code here
<%endif%>

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: Mar 3, 2009, 2:45 AM

Edit Log: