We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Use a file extension other than ".php"

Hi, Usually PHP applications made with Phalcon are structured in order to operate with ".php extension" files. I'd like to have all Controllers, Models and "personal" library classes with the ".inc" file extension. Also, I'd like to be able to create my personal library classes with the following file naming standard: ClassName.class.inc .

Is that possible with Phalcon?

Thank you

Phalcon has no bearing on whether this is possible or not (it is). Just do a Google search for something like "change extension of PHP files" - that should get you some answers.



125.8k
Accepted
answer

Hmmm, now that I think about it - the autoloader might require the ".php" extension. Sorry.



12.9k

Ok, thank you. No problem, I'll use .php.