I checked the manual and it's comments as well as google, but didn't find the
simple answer i'm wanting..

I have the following line in a "show php source code" page:

    if (ereg("(\.php)$",$o0o) && !ereg("\/\.\.", $o0o)){

It works fine on .php files but I was hoping I could include .inc files as well
when someone wanted to view the source of them.. To include .inc files as
viewable php source code, I'd rewrite it similar to below I assume, but I'm not
understanding the syntax I'm missing..

    if (ereg("(\.inc | .php)$",$o0o) && !ereg("\/\.\.", $o0o)){

I know I have to use a pipe to seperate allowable file types, but that's the
extent of what I know.. Any help would be appreciated.. TIA..

Take care.. peace..

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to