开发者

Require or Include PHP class : can't access functions

开发者 https://www.devze.com 2023-02-19 18:43 出处:网络
I am working on a Wordpress-based site. I\'m trying to include a PHP class, and seem to have success, though I can\'t use the functions within the class (functions are not recognized).

I am working on a Wordpress-based site. I'm trying to include a PHP class, and seem to have success, though I can't use the functions within the class (functions are not recognized).

Note: I'm including the clas开发者_StackOverflow中文版s inline via a custom template page within my WP theme.


Try to instantiate the class first, then access the function through your variable

$a = new Class();
$a->function();

But some functions are private, read the documentation of the class first..

0

精彩评论

暂无评论...
验证码 换一张
取 消