不知道如何使用 pug-php/pug

Edo*_*Edo 5 composer-php pug

我已经使用 composer安装了https://github.com/pug-php/pug,现在我的项目中有一个子目录 vendor/pug-php/pug 但我不知道如何使用它。

如果我尝试

$pug = new Pug();
Run Code Online (Sandbox Code Playgroud)

我显然得到了

未找到“Pug”类

我怎样才能使用它?

ivo*_*oba 1

看看 pug 中的示例:
https ://github.com/pug-php/pug/blob/master/example/index.php

这显示了如何独立使用它。

您的问题中缺少的自动加载器,您可以在这里找到:
https://github.com/pug-php/pug/blob/master/example/bootstrap.php