I am new to开发者_StackOverflow社区 cakePHP,
I have write a class in MODEL with name of myClass() and I have one function like func().
CODE:
class myClass(){
function func(){
echo "test";
}
}
But I don't know how to call the "myClass class" and run the function func() in the controller file in the cakePHP framework.
Of-course you can http://book.cakephp.org/view/943/Loading-Vendor-Files
App::import('Vendor', 'myClass');
$class = new myClass();
精彩评论