require_once at symfony

后端 未结 4 1521
一向
一向 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:24

    You can follow the PSR-0 standard to let the autoloader handle this. See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md and http://getcomposer.org/doc/04-schema.md#psr-0 .

    Or you could keep your files as is, and tell composer to require them each time : http://getcomposer.org/doc/04-schema.md#files

提交回复
热议问题