Slim Application Error

-1

I'm learning PHP for a Udemy course, but even though the instructors say in the ad that they'll answer the questions within 24 hours, it's been weeks, and they have not answered my question. Very frustrated, so I'm here asking for your help.

I am in the ecommerce module and in my project is giving error in the slim framework as in the image I am sending.

My question is: why the hell is giving code error? How to fix this error?

The project repository is here:

link

Man, I'm sorry, I forgot to put the file. I had spoken: "(...) as in the image I am sending." but I forgot the image.

    
asked by anonymous 27.04.2018 / 17:58

1 answer

0

This error is happening because you are not using the virtual host, so he did not find the temple.

If you do not want to add the virtual host, you can change line 32 and 33 of the Page.php file that is in the

/vendor/hcodebr/php-classes/src/Page.php

And so it goes:

32. "tpl_dir" => $_SERVER["DOCUMENT_ROOT"] . "ecommerce/views/",
33. "cache_dir" => $_SERVER["DOCUMENT_ROOT"] . "ecommerce/views-cache/",

Take the tests and let me know if it worked.

    
11.06.2018 / 17:44