You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
998 B

7 years ago
  1. <?php
  2. //编译词库
  3. ini_set('memory_limit', '128M');
  4. error_reporting(E_ALL);
  5. header('Content-Type: text/html; charset=utf-8');
  6. require_once('phpanalysis.class.php');
  7. $dicAddon = dirname(__FILE__).'/dict/not-build/base_dic_full.txt';
  8. if( empty($_GET['ac']) )
  9. {
  10. echo "<div style='line-height:28px;'>请选择要进行的操作:<br />";
  11. echo "1、<a href='?ac=make'>用原始文件(dict/not-build/base_dic_full.txt)生成一个标准词典;</a><br />";
  12. echo "2、<a href='?ac=revert'>从默认词典(dict/base_dic_full.dic),反编译出原始文件。</a></div>";
  13. exit();
  14. }
  15. if( $_GET['ac']=='make' )
  16. {
  17. PhpAnalysis::$loadInit = false;
  18. $pa = new PhpAnalysis('utf-8', 'utf-8', false);
  19. $pa->MakeDict( $dicAddon );
  20. echo "完成词典创建!";
  21. exit();
  22. }
  23. else
  24. {
  25. $pa = new PhpAnalysis('utf-8', 'utf-8', true);
  26. $pa->ExportDict('base_dic_source.txt');
  27. echo "完成反编译词典文件,生成的文件为:base_dic_source.txt !";
  28. exit();
  29. }
  30. ?>