When people edit their account on my site, they get confused and think they have to type out all of their steam profile link, e.g. http://steamcommunity.com/id/######
When all they have to type in the text field is, #######
, so if they mess up, how do I remove everything from their input, except the #####
part?
在PHP / HTML文本输入中,如何删除我不想提交到数据库的某些部分?
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
3条回答 默认 最新
- donglinxin8765 2013-01-30 17:30关注
How about:
$lastPart = array_pop(explode('/', $_SERVER['REQUEST_URI']));
This will retrieve the last element of the
REQUEST_URI
.解决 无用评论 打赏 举报