Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deal with the escape of routing links in Yii2.0 Basic code

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces how to deal with the escape of routing links in Yii2.0 Basic code, which is very detailed and has a certain reference value. Friends who are interested must read it!

According to the usual practice, state the running environment and the number of each version.

OS:Windows10

Apache:2.4

MySQL:5.7.15

PHP:7.0.11

Problem description: according to the prompt of the official website, download the basic version of the code, configure the virtual domain name, open the browser and access it (the specific process is brief).

However, when you click on the link address, you will find that the link address has been escaped and "/" has become "% 2F".

Find the code, step by step.

Find the last line 371 of yii-v2.0.9-basic\ vendor\ yiisoft\ yii2\ web\ UrlManager.php and find that the url link has been escaped by urlencode. I took it off here. If you visit again, you will be OK.

Finally, paste the code to find the path:

Yii-v2.0.9-basic\ views\ layouts\ main.phpyii-v2.0.9-basic\ vendor\ yiisoft\ yii2-bootstrap\ Nav.php (200line Html::a () method) yii-v2.0.9-basic\ vendor\ yiisoft\ yii2-bootstrap\ Html.phpyii-v2.0.9-basic\ vendor\ yiisoft\ yii2-bootstrap\ BaseHtml.phpyii-v2.0.9-basic\ vendor\ yiisoft\ yii2\ helpers\ Html.phpyii-v2.0.9-basic\ vendor \ yiisoft\ yii2\ helpers\ BaseHtml.phpyii-v2.0.9-basic\ vendor\ yiisoft\ yii2\ helpers\ Url.phpyii-v2.0.9-basic\ vendor\ yiisoft\ yii2\ helpers\ BaseUrl.php (102lines static::getUrlManager ()-> createUrl) yii-v2.0.9-basic\ vendor\ yiisoft\ yii2\ web\ UrlManager.php (line 371 urlencode method) these are all the contents of the article "how to deal with the escape of routed links in Yii2.0 Basic Code" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report