Hola a todos.
Tengo la siguiente funcion:
function run_plugin($plugin_class_name)
{
$myquery = "SELECT P.MODULE_NAME, P.CLASS_NAME, D.NAME DIRECTORY
FROM T_PLUGIN P LEFT JOIN T_DIRECTORY D ON (D.ID=P.DIRECTORY_ID)
WHERE P.NAME='$plugin_class_name'";
$r = mysql_query($myquery) or die(mysql_error());
if(!$r)
{
echo("failed $myquery");
}
$f = mysql_fetch_array($r);
include_once($f["DIRECTORY"]."/".$f["MODULE_NAME"]);
$plugin = new $f["CLASS_NAME"];
$html = $plugin -> run();
Return $html;
}
Y me aparece los siguientes errores al ejecutar la página :
Warning: run_plugin(/): failed to open stream: Success in /var/www/vhost/miservidor.com/home/html/calendar/classes/cPlugin.class.php on line 52
Warning: run_plugin(): Failed opening '/' for inclusion (include_path='.:/usr/share/pear') in /var/www/vhost/miservidor.com/home/html/calendar/classes/cPlugin.class.php on line 52
Fatal error: Cannot instantiate non-existent class: in /var/www/vhost/mi servidor.com/home/html/calendar/classes/cPlugin.class.php on line 54
Donde las lineas 52, 53 y 54 son respectivamentes estas:
include_once($f["DIRECTORY"]."/".$f["MODULE_NAME"]);
$plugin = new $f["CLASS_NAME"];
Podriais ayudarme que me estoy volviendo loco????
Gracias de antemano