Quantcast
Channel: Support & Bugs - Matomo forums
Viewing all articles
Browse latest Browse all 5706

Class *** not found

$
0
0

@Joyce wrote:

I create a plugin with ./console, named MyPlugin.
Then I write some php files in this plugin, which all begin with "namespace Piwik\Plugins\Myplugin". When I use function from other plugins, it will occur "Fatal error: Class 'Piwik\Plugins\MyPlugin**' not found.

<?php
namespace Piwik\Plugins\Myplugin;
use Piwik\Config;

$host = Config::getInstance()->database['host'];
echo $host;
?>

Fatal error: Class 'Piwik\Plugins\Myplugin\Config' not found

Not only this function, it seems like I cannot call any other functions in any plugin, not even in MyPlugin itself. I already write "use Piwik\Config" above.

Is there anything I miss? I am almost crazy about that.

I use Piwik 2.16 with PHP 5.4.16.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5706

Trending Articles