php class file extensions
Posted: Mon Aug 07, 2006 9:04 am
k...im trying to create a class file in php or a authentification script. what extension do i use? do i save it as a .inc or a .php
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Doesn't really make any difference but I'd suggest using .php since if the host is not set to parse .inc as PHP files the code will be displayed in a web browser for all to see.Obadiah wrote:k...im trying to create a class file in php or a authentification script. what extension do i use? do i save it as a .inc or a .php
ok....how does the file know to look at that file bc the file that im creating uses globals and arrays from another file....the book that i have says name them .inc my guess is because .inc stands for includes(the file is used as a resource or back up) so how would u tell the program your creating like a web form to parse a .php....ive been wondering that ever since i started even with the .inc bc the one that its asking to reference is a totally different file then its using for the rest of the informationd11wtq wrote:Doesn't really make any difference but I'd suggest using .php since if the host is not set to parse .inc as PHP files the code will be displayed in a web browser for all to see.