Home  >  Article  >  Backend Development  >  这样写是不是脱裤子放屁啊

这样写是不是脱裤子放屁啊

WBOY
WBOYOriginal
2016-06-23 13:34:101094browse

看到一段代码是这样写的
$site_url = strtolower('http://'.$_SERVER['HTTP_HOST'].substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/index.php')).'/shop/index.php');
然后我试了一下,
其实把红色部分去掉也是一样,但我不明白他为啥要脱裤子放屁呢
$site_url = strtolower('http://'.$_SERVER['HTTP_HOST']. substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/index.php')).'/shop/index.php');


回复讨论(解决方案)

这个可以不要。


不知道你是从哪里看到的代码,也不知道其真实的目的
但绝不是“脱裤子放屁”的问题
去掉了就是这样

怎么能说是一样的呢?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn