index.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. use KIF\Debug\Debug;
  3. use KIF\String\ZhuYin;
  4. use KIF\String\String;
  5. use KIF\Page\Page;
  6. use KIF\Route;
  7. use KIF\Core\Request;
  8. use KIF\Core\Config;
  9. define('KIF_PATH', '/export/manager/v2/v2_KIF');
  10. require_once KIF_PATH . '/init.php';
  11. Config::load(dirname(dirname(__FILE__)) . DS . 'config/config.inc.php');
  12. Route::getInstance()->rewrite();
  13. Request::getInstance()->dispatch();
  14. //echo String::jointUrl(Request::getInstance()->url(), array('page'=>'{page}'));exit;
  15. echo "<br />";
  16. $cur_page = Request::getInstance()->varGetInt('page', 1);
  17. $objPage = new Page(17, Request::getInstance()->pageUrlTpl(), $cur_page, 1);
  18. echo $objPage->html();
  19. Debug::time('zy new前', 'aa');
  20. $objZhuYin = new ZhuYin();
  21. Debug::time('zy new后', 'aa');
  22. $result = $objZhuYin->conversion('负离子去屑止痒洗发 aa 露 ', false, false, true);
  23. Debug::time('zy conversion后', 'aa');
  24. print_r($result);
  25. echo "<br />";
  26. echo preg_replace('#\s+#', '-', trim($result[0]));
  27. /*
  28. echo Route::getInstance()->reverse(array(
  29. 'c' => 'proList',
  30. 'a' => 'default',
  31. 'useType' => '2',
  32. 'priceRange' => '5',
  33. 'effectId' => '10000',
  34. 'subname' => 'mianbu/mianmo',
  35. 'brandId' => '3959992',
  36. 'page' => '1',
  37. ));
  38. */