From fa42e387a3c93a4ed9d3cc272eb47de457a03d89 Mon Sep 17 00:00:00 2001 From: Lion Date: Thu, 30 Jun 2022 22:10:24 +0800 Subject: [PATCH] fix the doc errors reported by https://github.com/lionsoul2014/ip2region/pull/232 --- binding/php/ReadMe.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/binding/php/ReadMe.md b/binding/php/ReadMe.md index 3ca2b8e..c8080e8 100644 --- a/binding/php/ReadMe.md +++ b/binding/php/ReadMe.md @@ -31,7 +31,7 @@ printf("{region: %s, took: %.5f ms}\n", $region, XdbSearcher::now() - $sTime); 如果你的 php 母环境支持,可以预先加载 vectorIndex 缓存,然后做成全局变量,每次创建 Searcher 的时候使用全局的 vectorIndex,可以减少一次固定的 IO 操作从而加速查询,减少 io 压力。 ```php // 1、从 dbPath 加载 VectorIndex 缓存,把下述的 vIndex 变量缓存到内存里面。 -$vIndex = XdbSearcher::loadVectorFromFile($dbPath); +$vIndex = XdbSearcher::loadVectorIndexFromFile($dbPath); if ($vIndex === null) { printf("failed to load vector index from '%s'\n", $dbPath); return; @@ -60,7 +60,7 @@ printf("{region: %s, took: %.5f ms}\n", $region, XdbSearcher::now() - $sTime); ### 缓存整个 `xdb` 数据 -如果你的 PHP 目环境支持,可以预先加载整个 `xdb` 的数据到内存,这样可以实现完全基于内存的查询,类似之前的 memory search 查询。 +如果你的 PHP 母环境支持,可以预先加载整个 `xdb` 的数据到内存,这样可以实现完全基于内存的查询,类似之前的 memory search 查询。 ```php // 1、从 dbPath 加载整个 xdb 到内存。 $cBuff = XdbSearcher::loadContentFromFile($dbPath);