Home  >  Q&A  >  body text

In php - the views in the ci framework are placed under the application directory. How to configure them to call these view pages?

In the company's project, the view layer including css and js styles are written to the application directory. I would like to ask you all, how to set up the configuration file and can these style files be used?

伊谢尔伦伊谢尔伦2576 days ago761

reply all(2)I'll reply

  • 滿天的星座

    滿天的星座2017-06-27 09:19:43

    No configuration file required, write directly in the view

    require(__DIR__ . '/..../xxxx.css');

    Like this

    Of course, there is also a method based on server configuration. In the project domain name configuration, make address aliases for CSS/JS and images, such as mapping http://xxx/css/* to the css of the project application Table of contents.

    reply
    0
  • 代言

    代言2017-06-27 09:19:43

    include() and require() should both work.

    reply
    0
  • Cancelreply