Reputation: 11
Following is the URL:
http://localhost/abc/xyz/ddd.php?json=[{ "rrrr": "ABC", "vvvv": "56464rgdfSAA345", "uuuuu": "12345678"}]
The above URL is in core PHP, I want to give the same format in Yii framework for web service.
How do I give the following part url in Yii:
http://localhost/abc/xyz/ddd.php?json=[{ "rrrr": "ABC", "vvvv": "56464rgdfSAA345", "uuuuu": "12345678"}]
Can anyone out there let me know what I can do to achieve such an URL in Yii?
Upvotes: 1
Views: 74
Reputation: 79113
In UrlManager config:
'rules' => array(
'xyz/ddd.php?json=<json>' => 'xyz/customAction',
In controller XyzController.php:
public action customAction($json) {
// do something
}
Upvotes: 1