Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何从此结构的 url 中提取项目 ID:
http://site.com/items/123456/item_title_is_here.html
在这种情况下,项目 ID 为 123456
用这个
$item = explode('/', $_SERVER['REQUEST_URI']); $itemId = $item[4];