Joomla Development - Allow Direct File Access AND use Joomla-intern Framework
- by Email
Hi
As usual you write in Joomla Development
defined('_JEXEC') or die('Restricted access');
I make a plugin which needs access from Paypal/IPN, so i exclude that in that specific file. BUT I also need to use the Joomla-intern Variables to access the Database, so i tried this:
require("../filewithaccesstoframework.php");
OR even
$baseurl = $_SERVER['HTTP_HOST'];
$baseurl ="http://".$baseurl."/configuration.php";
require($baseurl);
By using the first code it displays "Restircted Access" since it seems to take this from the included file which i can't skip to put-in-there.
The second code does not seem to recognize the Variables used in configuration.php like $host, $db, $password. the file configuration.php is chmod 444
Why this happens and is there a workarround to allow direct access to a file AND using the Joomla intern Framework (Variables, Functions)?