nginx 的 location表示位置。
其中 / 表示匹配所有位置,也就是拦截所有请求 uri 。
nginx 的 location表示位置。
其中 / 表示匹配所有位置,也就是拦截所有请求 uri 。
使用 defined 函数判断
defined('BASE_ROOT') or define('BASE_ROOT', dirname(__FILE__).'/');
上面的例子,如果没有定义 BASE_ROOT 常量,则定义该常量,如果已定义则不会重复定义。
php session占用程序内存,也就是 php.ini 中的 memory_limit 选项相关。
在程序处理时,比如动态生成的数组、对象等都占用 memory_limit 的数值,而 session 和它们共享,相当于程序内存数据,并没有额外存储。
除了查看配置文件之外,还可以循环往 session 里塞数据,即可测试得出当前版本当前配置下的最大数据。
语法如下:
curl -k --cacert es_http_ca.crt -u elastic:password https://122.31.133.20:9200
curl -k 表示忽略 https 验证
–cacert 表示证书地址
-u 用户名:密码
最后为 https 地址。
如果访问成功,说明远程 es 正常。
至少30张,
正常需要50张左右。
图片的比例要合适,要有各类图片,圆图、正方图,方图(长宽比例1.5到1.7之间)、大图(宽度100%)
图片要有动态效果,不要把效果放在同一处,要分布合理。
从6.7版本开始,支持配置中文,添加以下一行配置:
i18n.locale: "zh-CN"
linux下的命令:
bin/elasticsearch-create-enrollment-token -s kibana
windows下的命令:
bin\elasticsearch-create-enrollment-token.bat --scope kibana
参数:
-E :Configures a standard Elasticsearch or X-Pack setting.
-f, –force :Forces the command to run against an unhealthy cluster.
-h, –help :Returns all of the command parameters.
-s, –scope :Specifies the scope of the generated token. Supported values are node and kibana.
–url :Specifies the base URL (hostname and port of the local node) that the tool uses to submit API requests to Elasticsearch. The default value is determined from the settings in your elasticsearch.yml file. If xpack.security.http.ssl.enabled is set to true, you must specify an HTTPS URL.
参考 es 官方文档:elasticsearch-create-enrollment-token | Elasticsearch Guide [8.3] | Elastic
开机按 f2 进入 BIOS
设置语言为中文。
找到高级选项。
找到 CPU 设置
设置 打开虚拟化。
保存变更并退出。
从2维数组中,取一列,并封装为 一维数组
<?php
// 表示由数据库返回的可能记录集的数组
$a = array(
array(
'id' => 5698,
'first_name' => 'Bill',
'last_name' => 'Gates',
),
array(
'id' => 4767,
'first_name' => 'Steve',
'last_name' => 'Jobs',
),
array(
'id' => 3809,
'first_name' => 'Mark',
'last_name' => 'Zuckerberg',
)
);
$last_names = array_column($a, 'last_name');
print_r($last_names);
?>
将得到:
Array
(
[0] => Gates
[1] => Jobs
[2] => Zuckerberg
)
参数 | 描述 |
---|---|
array | 必需。规定要使用的多维数组(记录集)。 |
column_key | 必需。需要返回值的列。可以是索引数组的列的整数索引,或者是关联数组的列的字符串键值。该参数也可以是 NULL,此时将返回整个数组(配合 index_key 参数来重置数组键的时候,非常有用)。 |
index_key | 可选。用作返回数组的索引/键的列。 |
elasticSearch 历史版本下载:Past Releases of Elastic Stack Software | Elastic
elasticsearch-php 历史版本下载:Releases · elastic/elasticsearch-php (github.com)
analysis-ik 历史版本下载:Releases · medcl/elasticsearch-analysis-ik (github.com)
kibanna 历史版本下载:Past Releases of Elastic Stack Software | Elastic
注意,尽量选择相同版本,比如 kibanna 版本不能高于 elasticSearch。