2

PHP 相关问题

 2 years ago
source link: https://sevming.github.io/PHP/php-questions.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

PHP 相关问题

发表于 2020-07-02

| 更新于: 2021-07-13

| 分类于 PHP

$_SERVER[‘path_info’] WINDOWS环境下, 奇葩问题

# 路由地址以H5开头的, 首字母会被转化为大写
# 例:test.com/h5/getUser
path_info = H5/getUser

Redis 扩展 ping() 返回值

1. redis extension < 5.0, ping() return +PONG
2. redis extension >= 5.0, ping() return true

# 若设置了 $message, 则 ping($message = null) 成功后, 返回 $message, 兼容 redis 4.x 和 5.x 的 ping() 写法
if (!($redis->ping('+PONG') === '+PONG')) {
exit('redis connection is not available');
}

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK