I thought you're much smarter, young Padawan
classname => XFP_Test
this means=>
Library\XFP\Test
The force of sleep is overwhelming.
Thanks for answering. I wasn't sure if it started at /library or /community or / ...
define('__ROOT__', dirname(dirname(__FILE__)));
require_once(__ROOT__.'/config.php');
Try it out (that's the best & fastest way instead of waiting for a reply )Let me clarify ... would it be possible to use this to call an external page (outside XF)?
Let's say files are
/community
/blog
Could files from /blog be called?
Update:
This is my thought ...
template calls a php file located in /library/Tux/Footer with the class = Tux_Footer ...
In that file is a
PHP:define('__ROOT__', dirname(dirname(__FILE__))); require_once(__ROOT__.'/config.php');
Or something along that line ...
Try it out (that's the best & fastest way instead of waiting for a reply )
[B]Fatal error[/B]: require() [[URL='http://localhost/community/function.require']function.require[/URL]]: Failed opening required 'http://localhost/wp-blog-header.php' (include_path='C:\Program Files (x86)\Zend\Apache2\htdocs\community/library;.;.;C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library') in [B]C:\Program Files (x86)\Zend\Apache2\htdocs\community\library\Tux\Widget.php[/B] on line [B]6[/B]
[SIZE=3][B]Template Errors: PAGE_CONTAINER[/B][/SIZE]
[LIST=1]
[*][I]include_once() [<a href='function.include-once'>function.include-once</a>]: [URL]http:// wrapper[/URL] is disabled in the server configuration by allow_url_include=0[/I] in C:\Program Files (x86)\Zend\Apache2\htdocs\community\library\Tux\Widget.php, line 6:
5: ';
6: $__compilerVar1 = '';
7: $__compilerVar1 .= '
[*][I]include_once([URL]http://localhost/wp-blog-header.php[/URL]) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: no suitable wrapper could be found[/I] in C:\Program Files (x86)\Zend\Apache2\htdocs\community\library\Tux\Widget.php, line 6:
5: ';
6: $__compilerVar1 = '';
7: $__compilerVar1 .= '
[*][I]include_once() [<a href='function.include'>function.include</a>]: Failed opening '[URL]http://localhost/wp-blog-header.php[/URL]' for inclusion (include_path='C:\Program Files (x86)\Zend\Apache2\htdocs\community/library;.;.;C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library')[/I] in C:\Program Files (x86)\Zend\Apache2\htdocs\community\library\Tux\Widget.php, line 6:
5: ';
6: $__compilerVar1 = '';
7: $__compilerVar1 .= '
[/LIST]
What's inside your callback file?
Tried many different files but the simplest was a one line echo statement.
You can't use http://localhost/foo for this
Use the absolute path to your blog files
<?php
class Tux_Widget {
public static function getWidget(){
include 'C:\Program Files (x86)\Zend\Apache2\htdocs\Outside.php';
}
}
This has helped me loads.. still messing around with this but will provide a tutorial for xf users once i get my head around it completely, so far ive noticed this is very powerful and has loads of potential.
<?php
class footinc {
public static function getHtml(){
include '/home/web/public_html/library/test/123.php';
}
}
<xen:callback class="footinc" method="getHtml"></xen:callback>
Could not execute callback footinc::getHtml() - Not callable.
We use essential cookies to make this site work, and optional cookies to enhance your experience.