We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

if my websiter have two controllers and two views

How to write DI? How to write .htaccess? urls: https://localhost/ https://localhost/tow_controllers



4.5k

I know , write two config file;



98.9k

You can add many controllers and views as well to an application without change the .htaccess

@jyliao there are three examples in documentation. They explain everything. If those controllers are for two different websites, e.g., REsTful service and front-end, then yes: two config files, maybe one shared bootstrap file per site. If they are not, you can have as many controllers per single application as you like and one DI.