本文介绍了我想从php的网址中删除%20的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 这是我的页面网址 http://myaliveidea.com/news/news/readmore/56/%20When%20Harry%20and%20Sally%20met% 20New%20York%20City但我希望我的页面网址像这样 http://myaliveidea.com/news / news / readmore / 59 / When-Harry-and-Sally-met-New-York- Citybut i want my page url like thishttp://myaliveidea.com/news/news/readmore/59/When-Harry-and-Sally-met-New-York- City推荐答案此问题的解决方案是 <?php $url = str_replace(' ','-',$sport['title']); $url = str_replace(":",'',$url); $url = str_replace("'",'',$url); ?><a href="<?php echo base_url().'news/readmore/'.$sport['id']."/".urlencode($url);?>"><?php echo $sport_top['title'];?></a> 这篇关于我想从php的网址中删除%20的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-05 14:06