note 35442 added to function.include
| From: | n at NOSPAM dot plumdigitalmedia dot com | Date: | Mon, 01 Sep 2003 13:40:21 +0000 |
| Subject: | note 35442 added to function.include | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-55403@lists.php.net to get a copy of this message | ||
I've found that using .htaccess with include files saves a lot of the headaches commented on
here, if you're on Apache at least:
# -- .htaccess --
# stop people looking at include and template files - .inc and .tpl
<Files ~ "\.tpl">
Order allow,deny
Deny from all
</Files>
<Files ~ "\.inc">
Order allow,deny
Deny from all
</Files>
# control the include path(s) - seperate with : on nix or ; on win
php_value include_path "/mysite/lib:/mysite/includes"
# automatically include files at the top and bottom of every script
php_value auto_prepend_file "prepend.php"
php_value auto_append_file "append.php"
# -- end .htaccess --
The .htaccess file applies only to the directory it is in, and all sub-directories of it.
----
Manual Page -- http://www.php.net/manual/en/function.include.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35442
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35442&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35442&report=yes