URL issue generated when get submits a form in yii Framework ....... When submitting a form using GET, the URL is similar to www. baidu. comindex. phptest? What is behind id12? Id12: in the PHP or YII Framework, how can I change the URL to www. baidu. comindex. phptestid12 when the GET form is submitted ;? URL issue generated when the get form is submitted in the id12 yii Framework .......
When submitting a form using GET, the URL is similar to www.baidu.com/index.php/test? Id = 12
What is next? Id = 12
In PHP or YII Framework, how can I change the URL of the GET form to www.baidu.com/index.php/test/id/12?
Yes? Id = 12 is/id/12
Please help me.
I am using the YII Framework.
------ Solution --------------------
Form submission is a get url constructed by javascript.
/Index. php/test/id/12 is a routing rule of Yii, which can be modified in the following file:
Protected/config/main. php
Uncomment lines 41st to 48, and then use a routing rule similar to index. php/test/id/12.
In this way, when you submit the form to the current php application, the related javascript will reorganize the get url.
------ Solution --------------------
Refer to CUrlManager. the default access path is index. php? R = index (controller)/a (ACTION)/parameter 1/Data 1/parameter 2/Data 2
If you want to remove index. php? R = xxx configure the routing management class in main. php. Take a look at the basic introduction of the above classes and change. htaccess!