require_once at symfony

后端 未结 4 1537
一向
一向 2021-01-07 10:46

I\'m making now things with php + Symfony2 framework, and I have the following code:

require_once(\"one_file.php\");
require_once(\"another_file.php\");
         


        
4条回答
  •  忘掉有多难
    2021-01-07 11:26

    You want to follow these other answers, especially the approved one, but if you are using a third party library with tons of PHP files, you can do require_once(__DIR__.'/path/to/file.php') as a quick fix.

提交回复
热议问题