wikitten部署遇到的问题

config.php文件配置

define('ENABLE_EDITING', true);这里必须为true,否则报错。

  1. Fatal error: Uncaught Exception: View index not found in /wwwroot/wiki/wiki.php:237
  2. Stack trace:
  3. #0 /wwwroot/wiki/wiki.php(347): Wiki->_view('index', Array)
  4. #1 /wwwroot/wiki/wiki.php(280): Wiki->indexAction()
  5. #2 /wwwroot/wiki/wiki.php(34): Wiki->dispatch()
  6. #3 {main} thrown in /wwwroot/wiki/wiki.php on line 237

但是这样一来任何人都可以修改wiki内容,对于个人搭建的wiki来说存在安全隐患。为了解决这个问题,只能采取权宜之策:
1. 在views/render.php中隐藏Toggle source按钮和Save Changes按钮。
2. 在wiki.php文件中注释掉file_put_contents($filepath, $content);放弃提交的修改。