Coder Social home page Coder Social logo

website's People

Contributors

chenhuajun avatar doudou586 avatar redraiment avatar xiongliding avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

website's Issues

9.3~9.5版本手册全文检索查找不到结果

问题

9.3~9.5版本手册全文检索查找不到结果

原因

9.3~9.6版本的手册是HTML格式,不是well-formed XML(PG10以后是well-formed XML格式)。调用loadXML导入会失败,导致插入到数据库中得到记录不完整,没有提取到keywords。

	$doc = new DOMDocument();
	$content = file_get_contents('/var/www/html/docs/9.6/btree-gist.html');
	$doc->loadXML($content);

/var/www/html/application/logs/log-2020-10-04.php

ERROR - 2020-10-04 02:04:48 --> Severity: Warning  --> DOMDocument::loadXML(): Opening and ending tag mismatch: META line 27 and HEAD in Entity, line: 30 /var/www/html/application/controllers/v2/doc_search.php 113

/var/www/html/docs/9.6/btree-gist.html:27

CONTENT="text/html; charset=utf-8"><META
NAME="creation"
CONTENT="2020-10-03T18:03:22"></HEAD

注: 奇怪的是,以前9.3~9.6创建索引是成功的,最近更新索引失败了。怀疑虚机环境发生过变更,以前loadXML()检查不严格,现在严格了。

对策

建议修改html加载方式

/var/www/html/application/controllers/v2/doc_search.php

	$doc->loadXML($content);
==>
	$doc->loadHTML($content);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.