php class file extensions
Moderator: General Moderators
php class file extensions
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
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: php class file extensions
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
Re: php class file extensions
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.