问题
Does anybody know if CakePHP 2.x has a naming conflict between a Model named File.php and CakePHP File classes?
Thanks in advance!
回答1:
Yes. There's a utility class File and the lack of namespacing in CakePHP 2.x means you can't have a second class sharing the same name. You will need to find an alternative name for your model, e.g. Document.
In CakePHP 3.x this issue is removed as it uses namespaces.
来源:https://stackoverflow.com/questions/34212753/model-naming-conflict-in-cakephp