Closed trentwiles closed 3 years ago
Hello,
I ran this code without issue, so the problem is not in this pug file. Please provide the PHP code that parse it and head.pug
$pug = new Pug();
$output = $pug->render('views/count.pug', array(
'bot_users' => $stat[0],
'bot_servers' => $stat[1],
'bot_commands' => $stat[2],
'requests' => $timev2
));
echo $output;
I've checked and all these variables are defined.
You're not rendering the view/count.pug
file here, render()
take a Pug code string as input, so this will actually try to render as a Pug code the string "view/count.pug"
and so it fails.
You need to use renderFile()
instead.
Thanks.
Thanks, I'll have a look.
I see the README is not up to date, I will fix it and recommend to refer mainly to https://phug-lang.com (the complete documentation).
Hello,
I'm a bit new to pug in PHP and am getting this error:
What does this mean? I have defined all of the variables in my pug file: