Mailing List Archive

Enable inc files
Hello,

Does anyone knows how to enable apache working with the .inc files, from
php? Where can i find more information about these file format?

Thanks,

+-------------------------
Fernando A. R. Wendt
Webmaster UNIJUÍ
http://www.unijui.tche.br
-------------------------+


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Enable inc files [ In reply to ]
'inc' files are usually just php files that are 'pulled in' using the php 'include([file])' function. I've seen 'inc' files done in two ways -

1. instead of 'myinclude.inc', use 'myinclude.inc.php' - this will use the default php extention, and will therefore let the server know it should be parsed by the php interpreter.

- or -

2. If every 'inc' file you intend to use is for php only, you could consider adding as an extention for php in your conf/httpd.conf -

AddType application/x-httpd-php .php .inc

You may also need to edit your php.ini to tell the php parser where include files are located:

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
include_path = ".;C:\php-4.1.1\pear;C:\php-4.1.1\includes"

If you want php to look for include files in the same directory as the calling php file, make sure the '.' is listed (usually is by default).

I hope this helps.

--
Pete Nelson, Web Developer
<pete.nelson@ci.stpaul.mn.us>
http://www.ci.stpaul.mn.us/

>>> fernando@admijui.unijui.tche.br 02/22/02 11:15AM >>>
Hello,

Does anyone knows how to enable apache working with the .inc files, from
php? Where can i find more information about these file format?

Thanks,

+-------------------------
Fernando A. R. Wendt
Webmaster UNIJUÍ
http://www.unijui.tche.br
-------------------------+


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org