Page 1 of 1

Custom php page includes

Posted: 2025-02-01 05:07
by dlee
I need to create a custom php page to retrieve data for an ajax call. What are the php files in Appgini that need to have require_once() statements in the new php file?

I hope this makes since...
TD

Re: Custom php page includes

Posted: 2025-02-01 15:46
by saymaad
Just the lib.php which is in the root of the generated application.

Code: Select all

	include_once(__DIR__ . "lib.php"); // If your ajax file is going to be on the app root
	include_once(__DIR__ . "/../lib.php"); // OR use this if you are putting your custom ajax file inside hooks folder

Re: Custom php page includes

Posted: 2025-02-02 00:22
by zibrahim
You also may want to have a look at the Documentation of AppGini for security etc.
https://bigprof.com/appgini/help/advanc ... ess-pages/

Have a nice day.