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

CodersClub

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

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

[Copy link]
Post time: 2018-07-05 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-07-05 20:43
| Show all posts
Thank you!
Will fix.

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

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

 Russia

Post time: 2018-07-09 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-07-09 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

Top.Mail.Ru
Top.Mail.Ru

2024-03-29 09:47 GMT+3 , Processed in 0.052636 sec., 8 queries .

Powered by Discuz! X3.4 Release 20230520

© 2001-2024 Discuz! Team.

MultiLingual version, Rev. 4301, © codersclub.org

Quick Reply To Top Return to the list