标签: php .htaccess
我想将%标记替换为 - url的这个标记
来自
`http://localhost/news/news/6/1/my%news%of%bangla 到 http://localhost/news/news/6/1/my-news-of-bangla
`http://localhost/news/news/6/1/my%news%of%bangla 到
http://localhost/news/news/6/1/my-news-of-bangla
答案 0 :(得分:1)
让你有一个标签
$pageName = "my news of bangla"; $pageUrl = str_replace("%", "-", $pageName); <a href="example.com/<?php echo $pageUrl; ?>"> my news of bangla </a>
然后使用