【发布时间】:2013-04-22 20:11:50
【问题描述】:
我一直在查看 this tutorial 向 Silverstripe (3.0.5) 的管理区域添加一个简单页面,但在 apache 日志中出现分段错误错误。
我认为问题在于“customHelp.php”中的“index”方法 - 当我将“index”重命名为其他名称时,我没有崩溃,并且在管理菜单中出现了一个条目,但显然当我没有显示任何内容时点击它。
这是我的“customHelp.php”的内容 - 有人可以指点我正确的方向吗?
<?php
class customHelp extends LeftAndMain {
static $url_segment = "customHelp";
static $menu_title = "Site Help";
static $allowed_actions = array ('customHelp');
public function index() {
return $this->renderWith('customHelp');
}
public function init() {
parent::init();
}
}
【问题讨论】:
-
为什么您认为问题出在您的索引方法上?你能更具体地说明错误吗?您的 customHelp.ss 文件中有什么内容?
-
我只是在我的网页中收到“未收到数据 - 服务器未发送数据”(网址为 mysite.local/admin/customHelp )。例如,如果我将 index() 重命名为 xindex(),则管理站点加载正常,大概是因为没有调用该方法。我的“customHelp.ss”和教程页面上的一样(存储在/customHelp/templates)
标签: php content-management-system silverstripe