我有一个类似gradle-experimental
的网址。
如果点击了链接,我想要获取http://localhost/m/2016/05/05/sebut-gubernur
。
答案 0 :(得分:0)
// This is the override
doFilter(ServletRequest request, ServletResponse response, FilterChain chain) {
if (request has param I'm looking for) {
// This says, "perform the authentication"
super.doFilter(request, response, chain)
}
else {
// This says, "skip this part of the filter chain"
chain.doFilter(request, response)
}
}
答案 1 :(得分:0)
$part = explode("/", urldecode($_SERVER['REQUEST_URI']));
echo $part[(count($part) - 1)]; //sebut-gubernur
变量可以帮助你。并且还会爆炸功能。
.htaccess
注意:此类网址还需要
sebut-gubernur
代码。
OR
如果您将链接作为字符串并希望获得$link = 'http://localhost/m/2016/05/05/sebut-gubernur';
$part = explode("/", urldecode($link));
echo $part[(count($part) - 1)]; //sebut-gubernur
,请尝试:
String dateString = "Sun Apr 15 13:37:33 CEST 2012";
SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US);
System.out.println(sdf.parse(dateString));