fukuball / jieba-php

"結巴"中文分詞:做最好的 PHP 中文分詞、中文斷詞組件。 / "Jieba" (Chinese for "to stutter") Chinese text segmentation: built to be the best PHP Chinese word segmentation module.
http://jieba-php.fukuball.com
MIT License
1.32k stars 260 forks source link

Jieba.php line 280 Call to a member function exists() on array #26

Closed kangkang66 closed 6 years ago

kangkang66 commented 7 years ago

FatalErrorException in Jieba.php line 280: Call to a member function exists() on array

version:0.25

fukuball commented 7 years ago

do you require these libraries?

require_once "/path/to/your/vendor/multi-array/MultiArray.php";
require_once "/path/to/your/vendor/multi-array/Factory/MultiArrayFactory.php";
zplzpl commented 7 years ago

出现同样的问题,使用YII2框架,使用composer安装。

autoload_files.php 部分内容

'f40cb564d92ad0e78b0bfdf9b86c5768' => $vendorDir . '/fukuball/jieba-php/src/class/Jieba.php', 'a778fafb0619406705f6fd4bb3ec7d5b' => $vendorDir . '/fukuball/jieba-php/src/class/JiebaAnalyse.php', '06c61fd667b7f3d9ee59d805e51017e7' => $vendorDir . '/fukuball/jieba-php/src/class/Finalseg.php', '750aa4fdf8bfc24d7baef293581bec73' => $vendorDir . '/fukuball/jieba-php/src/class/Posseg.php', '6ca3f08a814c4fd9d5830fc6808a9488' => $vendorDir . '/fukuball/jieba-php/src/vendor/multi-array/MultiArray.php', '4d5ee3c1cc66ee941937c247fe6b7d6e' => $vendorDir . '/fukuball/jieba-php/src/vendor/multi-array/Factory/MultiArrayFactory.php',

使用的版本:dev-master

fukuball commented 7 years ago
2017-09-06 6 12 22 2017-09-06 6 14 07 2017-09-06 6 12 42

我實在是無法 reproduce 這個問題,所以目前不知如何修

jokercoplay commented 7 years ago

Have you done the init operation?