[PHP] execute a script on access to a directory
Hi, I would like to know how i can force a PHP script to be executed everytime a certain directory is accessed, for example in http://domain.com/go/getit the presence of the /go/ directory would force a PHP script to be executed prior to any operation. Do i need to play with rewriting urls in Apache or is there any other cleaner method (that would not require rewriting URLs) to achieve this? i'd hate to have to rewrite URLs... thanks. Enrique- _ Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] execute a script on access to a directory
You could always add an include() for every page under the /go directory. Simplest way that I can think of. - Original Message - From: Enrique Vadillo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 07, 2001 12:09 PM Subject: [PHP] execute a script on access to a directory Hi, I would like to know how i can force a PHP script to be executed everytime a certain directory is accessed, for example in http://domain.com/go/getit the presence of the /go/ directory would force a PHP script to be executed prior to any operation. Do i need to play with rewriting urls in Apache or is there any other cleaner method (that would not require rewriting URLs) to achieve this? i'd hate to have to rewrite URLs... thanks. Enrique- _ Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] execute a script on access to a directory
Nope, i'm not talking about a directory containing exclusively PHP scripts, in that case i would've prepended a php script to the directory and we're done, but no, i am talking about access to a directory containing files of any kind. see? Thanks for the help anyway, any better suggestions? Enrique- From: Jason Bell [EMAIL PROTECTED] To: Enrique Vadillo [EMAIL PROTECTED], PHP Users [EMAIL PROTECTED] Subject: Re: [PHP] execute a script on access to a directory Date: Fri, 7 Sep 2001 12:12:58 -0700 You could always add an include() for every page under the /go directory. Simplest way that I can think of. - Original Message - From: Enrique Vadillo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 07, 2001 12:09 PM Subject: [PHP] execute a script on access to a directory Hi, I would like to know how i can force a PHP script to be executed everytime a certain directory is accessed, for example in http://domain.com/go/getit the presence of the /go/ directory would force a PHP script to be executed prior to any operation. Do i need to play with rewriting urls in Apache or is there any other cleaner method (that would not require rewriting URLs) to achieve this? i'd hate to have to rewrite URLs... thanks. Enrique- _ Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]