如何使用PHP清理标题URI? [英] How do I sanitize title URIs with PHP?

查看:76
本文介绍了如何使用PHP清理标题URI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写博客,我希望URI像在stackoverflow中的问题标题一样,或者像wordpress一样是标题.
清理URI的规则是什么?
在PHP中是否已经存在执行此操作的代码?

I am programming a blog and I want the URIs to be the title like the question title here in stackoverflow or like wordpress.
What are the rules for sanitizing a URI?
Is there an already made code in PHP that does this?

在此先感谢,
厄默尔

Thanks in advance,
Omer

推荐答案

许多CMS已经实现了类似的功能,另一个问题.通常,您可能还会对有关此技术的问题感兴趣.

Many CMS's have implemented something like that, the one of Wordpress has been posted in another question. You might be interested in the question about this technique in general, too.

这篇关于如何使用PHP清理标题URI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆