4
我有以下url结构。检查url是否包含某个字,然后显示
example.com/items/something_something.
什么是php代码来检查url包含单词“items”,然后显示某些div?
<?php if() { ?> <!--Check if url contains the word "items" -->
Show this
<?php } else { ?>
Don't show this
<?php } ?>
感谢