Vtiger自定义模块:"抱歉!尝试访问受限文件."

php*_*.in 2 php crm vtiger

我创建了一个测试模块名称Mytest.在保存模块中的值时,我得到一个空白页面并说"抱歉!尝试访问受限文件.".有谁知道,为什么会发生这种情况.对此的任何帮助都非常值得赞赏.

Mil*_*ani 7

导致vTiger错误的最可能原因是"抱歉!尝试访问受限文件."'config.inc.php'中的$ root_directory值不正确或拼写错误.

要更正它,请按照以下步骤操作:

Go to your vTigerCRM directory
Open “config.inc.php” with your favorite text editor
Go to line 86 and adjust $root_directory value to correct vTiger 
directory. Note, that the directory must end with /. It should look 
something like this – $root_directory = ‘/var/www/vtigercrm/’;
Run Code Online (Sandbox Code Playgroud)

高速缓冲存储器也存在问题.因此,请检查缓存文件中的模板文件.为此,请转到vTigerCRM目录.然后转到Smarty-> templates_c.

在这里,您将获得缓存文件列表.删除此文件并检查天气是否解决了问题.

不要担心删除此文件.


hal*_*.am 5

当您尝试从自定义模块中包含文件时,您将收到这些消息,因为Vtiger认为您从他们发现相当不安全的位置包含这些文件.

为避免此错误,您可以使用标准方式在Vtiger中使用模块,方法如下:......./index.php?module=Mytest&action=index.Vtiger将包含您的模块,现在您无需包含CRMEntity其他data或utils相关文件.这都应该是可用这种方式,但要确保你使用的global语句$current_user,$current_module等虽然.

另一种方法是编辑以下功能utils/CommonUtils.php:

heckFileAccessForInclusion() 和 checkFileAccess()

删除或注释掉die()这些功能以修复它.