伪静太如何get自定义字符?

#1 phpdjr

伪静太我的是这样写的
'/.html'=>'main/company'
但是我的控制里如何写才能得到
xxxx.com/about.html
if(arg('s')='about'){echo 1;}else{echo 0;}

2017-07-23 23:54:34

#2 sheevy

https://github.com/SpeedPHP/manual/blob/master/%E8%AE%BF%E9%97%AE%E4%BA%A4%E4%BA%92-%E4%BC%AA%E9%9D%99%E6%80%81%E5%8F%8AURL%E8%B7%B3%E8%BD%AC.md
去掉前面的 / 你就成功了。

2017-07-24 11:39:40

#3 jake

1. 手册应该看清楚,多了斜杠,如楼上朋友说的。
2. 别用if(arg('s')='about')这种单个等号的写法,新手很难把握这个写法产生的问题,建议是用==

2017-07-24 12:48:27