a itemprop=url href=php $this-permalink php $this-title a 将permalink 返回内容中的 indexphp删除 使用替换是无效的
要删除permalink返回内容中的/index.php,你可以使用PHP的str_replace函数来进行替换。以下是一个示例代码:
<a itemprop="url" href="<?php echo str_replace('/index.php', '', $this->permalink()); ?>"><?php $this->title() ?></a>
在上述代码中,我们使用str_replace函数将permalink返回内容中的/index.php替换为空字符串,然后将结果作为href属性的值。这样就可以删除/index.php了。
原文地址: https://www.cveoy.top/t/topic/iVMT 著作权归作者所有。请勿转载和采集!