To make long story short: namespace your classes correctly and they will be autoloaded.
For example if you are using basic template ( and the name of your application is "basic" ) you can create myclasses folder in the root of application (basic/myclasses). And all classes you put there namespace with
namespace app\myclasses;
They will be autoloaded. To use your common class somewhere you would just use it like this:
use app\myclasses\MyCommonClass;
NOTE: If you are using advanced template app is not your root namespace. You have frontend, backend, common, console…
use skate_in\skeyra\biblioteca\utils;
$path=utils::lookup("sys_parametros","id",48,"valor");
This view is located at /home/skate_in/views/site
The utils.php file with the class goes like:
namespace skate_in\skeyra\biblioteca;
class utils
{
public static function lookup($tabela,$coluna_pesquisa,$valor_a_pesquisar,$coluna_resultado){
......
utils.php is located at /home/skate_in/skeyra/biblioteca/utils.php
Also, (don’t know if it has some influence) my public files (content of basic/web) is at /home/public_html/skate (this is where user lands on my page)
Yii starts file. But class utils is never recognized…