What is url routing? How do I configure url routes?

wjj16387142 注册会员
2023-01-25 21:03
< div class = "md_content_show e397 data - v - 3967" = "" >

hope to adopt oh

dbwjik 注册会员
2023-01-25 21:03

In the jargon, the route is the mapping of urls to functions such as/books-> getBooks(), which executes the getBooks() function when /books is accessed. Or you open up a web page, and the web page shows what data, through this URL, corresponds to the corresponding function on the server, and returns the corresponding data.
php configuration route :
Location 1: project configuration file config.php
Example: app/web/config.php
Location 2: common configuration file
Configuration format
'router' => array(
'space' => 'space/index',
'archive/read' => 'article/index',
'search' => 'index/search'

About the Author

Question Info

Publish Time
2023-01-25 21:03
Update Time
2023-01-25 21:03