How to get an empty parameter from an url like “example.com/id//”?

北慕城南 提交于 2019-12-11 16:27:45

问题


I am using symfony 1.0 and below is the URL which displays the news description.

http://news4u.com/search/news/id/344158/css//act/n

In the above URL value for CSS is missing and the URL is supposed to be as below

http://news4u.com/search/news/id/344158/css/n/act/n

When I use $this->getRequestParameter('css') to get the value of css, I get it as 'act' and if the do the same for 'act', I get empty value.

$getRequestParameter('css')=act
$getRequestParameter('act')=<EMPTY>

I am getting values for above parameters for the metioned URL.

I want to get value of 'act' in above URL. How to get that?

来源:https://stackoverflow.com/questions/11034591/how-to-get-an-empty-parameter-from-an-url-like-example-com-id

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!