dongye7231 2019-07-01 15:54
浏览 91

如何正确使用Joomla JFactory基本路径?

I am using a Joomla website which runs from the root of my web folder (public_html), and within this domain i am running a number of my own applications which are held in sub folders.

For this example assume public_html is the joomla public application, and public_html/admin is the location of my third party applcation.

I am trying to get single sign on to work, by accessing Joomla Session variables and then passing later into iframe.

The code i have so far is:

define('JPATH_BASE', "/home/sites/accredits.co.uk/public_html" );

require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );

But this is generating the following error in the 2nd app:

Warning: require_once(/home/sites/accredits.co.uk/public_html/includes/defines.php): failed to open stream: No such file or directory in /home/sites/8b/e/e7cd425fb2/public_html/admin/include/appsettings.php on line 651

Fatal error: require_once(): Failed opening required '/home/sites/accredits.co.uk/public_html/includes/defines.php' (include_path='.:/usr/share/pear') in /home/sites/8b/e/e7cd425fb2/public_html/admin/include/appsettings.php on line 651

I believe the problem may be down to the base path but i am not sure, has anyone else seen this

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 使用C#,asp.net读取Excel文件并保存到Oracle数据库
    • ¥15 C# datagridview 单元格显示进度及值
    • ¥15 thinkphp6配合social login单点登录问题
    • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配