Xarcell
Well-known member
I'm not even sure this can be done.
I purchased a baby name script and is installed at my forum root different in a different DB. Now I'm trying to include it into a page.
This is what I have:
library/XenForo/Pages/BabyNames.php
Page:
PHP Callback: XenForo_Pages_BabyNames :: includeFile
The error I get when visiting the page:
I purchased a baby name script and is installed at my forum root different in a different DB. Now I'm trying to include it into a page.
This is what I have:
library/XenForo/Pages/BabyNames.php
Code:
<?php
class XenForo_Pages_BabyNames
{
public static function includeFile(XenForo_ControllerPublic_Abstract $controller, XenForo_ControllerResponse_Abstract &$response)
{
ob_start();
include('http://inspireromance.com/babynames/index.php');
$babyNames = ob_get_contents();
ob_end_clean();
$params = array(
'babyNames' => $babyNames
);
$response->params = array_merge(
$response->params,
$params
);
}
}
Page:
Code:
<div class="baseHtml messageText">
{xen:raw $babyNames}
</div>
PHP Callback: XenForo_Pages_BabyNames :: includeFile
The error I get when visiting the page:
Anything I can do to make this work?Server Error
include() [function.include]: URL file-access is disabled in the server configuration
- [*]XenForo_Application::handlePhpError() in XenForo/Pages/BabyNames.php at line 7
[*]XenForo_Pages_BabyNames::includeFile() in XenForo/Pages/BabyNames.php at line 7
[*]XenForo_Pages_BabyNames::includeFile() in XenForo/ControllerPublic/Page.php at line 46
[*]XenForo_ControllerPublic_Page->actionIndex() in XenForo/FrontController.php at line 310
[*]XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
[*]XenForo_FrontController->run() in /home/xarcell/public_html/inspireromance.com/index.php at line 15