REQUEST_URI错误:出现在functions.php神秘的73行

2019/10/1221:05:19 评论 105 views
Warning: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’ (this will throw an Error in a future version of PHP) in /var/www/web/wp-content/themes/slatudou/functions.php on line 73

这个奇怪的错误,到底是为什么呢

打开funcitons.php第73行,代码如下:

$path = $_SERVER['HTTP_HOST'] . $_SERVER[REQUEST_URI];

注意到什么问题了么,一边少了一个单引号:REQUEST_URI的左右。

加上双引号,问题解决:

<pre>$path = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];</pre>

原梓番主讲Excel进阶与提升视频课(淘宝在线观看)
PPT精品模板
Wordpress建站问题咨询解决
Excel表格制作

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: