Please select To the mobile version | Continue to access the desktop computer version
| |
| | |

CodersClub

 Forgot password?
 Register
Search
View: 52|Reply: 4
Collapse the left

checkrobot()函数中$_SERVER['HTTP_USER_AGENT']产生的php Undefined index提示

[Copy link]
Post time: 2018-7-5 20:10
| Show all posts |Read mode
本帖最后由 AlanJia2017 于 2018-7-5 20:19 编辑
PHP Notice:  Undefined index: HTTP_USER_AGENT in F:\\xxx\source\\function\\function_core.php on line 312

source\function\function_core.php中checkrobot函数

  1. $useragent = strtolower(empty($useragent) ? $_SERVER['HTTP_USER_AGENT'] : $useragent);
Copy the Code
https://stackoverflow.com/questions/14130830/php-undefined-index-http-user-agent

 Russia

Post time: 2018-7-5 20:43
| Show all posts
Thank you!
Will fix.

But WHY your UserAgent is not defined???
 Author| Post time: 2018-7-6 10:49
| Show all posts
vot 2018-7-5 20:43
Thank you!
Will fix.

很奇怪啊,而且官方的版本都是那样子写的。
不过到不是致命错误,只是警告提示。
有可能是在执行后台的定时任务的时候没有带UA信息吧。

 Russia

Post time: 2018-7-9 19:50
| Show all posts
Very strange, and the official version is written like that.
But it is not a fatal error, just a warning.
It is possible that there is no UA information when performing background tasks in the background.


Thank you for your explanation!

 Russia

Post time: 2018-7-9 20:01
| Show all posts
Fixed in rev.#823
You have to log in before you can reply Login | Register

Points Rules

Archive|Mobile|Dark room|CodersClub  

2018-7-16 09:28 GMT+3 , Processed in 0.093996 sec., 11 queries .

Powered by Discuz! X3.4

Release 20170801, © 2001-2018 Comsenz Inc.

MultiLingual version, Rev. 710, © 2009-2018 codersclub.org

Quick Reply To Top Return to the list