Custom php page includes

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
dlee
Veteran Member
Posts: 168
Joined: 2020-04-14 00:21
Location: South Carolina, USA
Contact:

Custom php page includes

Post by dlee » 2025-02-01 05:07

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

saymaad
AppGini Super Hero
AppGini Super Hero
Posts: 56
Joined: 2024-06-03 16:17

Re: Custom php page includes

Post by saymaad » 2025-02-01 15:46

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

User avatar
zibrahim
Veteran Member
Posts: 170
Joined: 2020-01-28 18:30
Location: Malaysia

Re: Custom php page includes

Post by zibrahim » 2025-02-02 00:22

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.
Zala.
Appgini 25.12, MacOS 15.5 Windows 11 on Parallels.

Post Reply