Reputation: 3731
Just curious, I've noticed that some php files have extension 'class.php' or 'html.php'. What is the reason for a code file to have such extensions?
Thank you in advance!!
Upvotes: 0
Views: 337
Reputation: 51797
this doesn't have any special effect, as the real extension is still just .php. one might choose to name files like this to seperate views and models or something like that - but you could also use subfolders (named html and class for example) or don't use any kind of naming convention at all (wich might end up in a very confusing file-structure.)
Upvotes: 0
Reputation: 100175
Depends on creation, it might mean like:
Upvotes: 1
Reputation: 2314
Having files with .php are executed by the PHP engine. Some people like to use periods as extensions of their uses.
ie
create.my.template.html.php
create.my.template.html
is the file name. .php
is the extension.
Upvotes: 0
Reputation: 318468
It has no specific meaning. Most likely .class.php
contains a classe and .html.php
could be a template.
Using ClassName.class.php
has the advantage that you can safely use autoloading to include $className.'.class.php'
in the __autoload()
function without possible conflicts (e.g. with a class named index
- you most likely have an index.php
but that class' file would be index.class.php
so it would not be a problem).
Upvotes: 0
Reputation: 9738
It must be a custom thing, maybe class.php extensions are "models" and html.php files are "views"
Upvotes: 2