bug? custom page
Posted: 2016-07-14 00:06
AppGini 5.51
I'm basing an ajax call on the technique give in the Udemy course. The code I have in the ajax php file is;
With this script in the hooks folder, I get an error 500. Tracing through, the error occurs in loading lib.php
If I move the script into the application folder (up, out of hooks) and change the $currDir assignment:
then the ajax call/script work perfectly.
I'd say this is a bug, right? Ajax scripts should be able to exec from the hooks folder (or any other folder so long as the paths are adjusted properly.)
I'm basing an ajax call on the technique give in the Udemy course. The code I have in the ajax php file is;
Code: Select all
<?php
$currDir = dirname(__FILE__) . '/..';
include("$currDir/defaultLang.php");
include("$currDir/language.php");
include("$currDir/lib.php");
/* grant access to all users with access to material table */
...
If I move the script into the application folder (up, out of hooks) and change the $currDir assignment:
Code: Select all
$currDir = dirname(__FILE__);
I'd say this is a bug, right? Ajax scripts should be able to exec from the hooks folder (or any other folder so long as the paths are adjusted properly.)