You are here: Re: [PHP] Forcing auto_prepend_file to work regardless of what document was accessed « PHP « IT news, forums, messages
Re: [PHP] Forcing auto_prepend_file to work regardless of what document was accessed

Posted by "Richard Lynch" on 10/23/05 07:44

On Sat, October 22, 2005 11:25 pm, Dan Trainor wrote:
> Anyone know if it's possible to use auto_prepend_file to force the
> appending of a file to the request, regardless of what kind of
> document
> is generated?
>
> I can see this being a problem if the document was a picture or a
> video
> or some such - but is thre a hidden argument list to auto_prepend_file
> where I can force inclusion of this file, if x, y, and z document
> types
> were requested?

Not the way you describe it, but...

In .htaccess, put:

<Files .xyz>
ForceType application/x-httpd-php
</Files>


Now all your .xyz files ARE PHP files.

auto_prepend will happen.

PHP will "parse" the files but do nothing unless they happen to
contain the character combination <?php (or <? or <?= if you have
short_tags on)

This may or may not be suitable in your environment.

--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация