基于php伪静态的实现详细介绍

pqh1056 22 0 PDF 2020-12-22 20:12:52

1.根据$_SERVER[‘PATH_INFO’]来操作实现。 举个列子比如你的网站的地址是 http://127.0.0.1/show_new.php/look-id-1.shtml你echo $_SERVER[‘PATH_INFO’] 出来的结果就会是 /look-id-1.shtml 看到这个我想大家可能已经明白了。完整的demoindex.php复制代码 代码如下:index.php $conn=mysql_connect(“localhost”,”root”,”root”)or dir(“连接失败”);mysql_select_db(“tb_demo”,$conn);$sql=

用户评论
请输入评论内容
评分:
暂无评论