Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

[Added] nuconfig.php: Including external Files

Information about updates, news, Code Library
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

[Added] nuconfig.php: Including external Files

Unread post by admin »

You can create your own php library in a separate file then include it in nuconfig.php. This is useful if you are going to use the same functions in several forms.

If myphplib.php is in nuBuilder's root/lib directory, include it like this:

Code: Select all

$nuConfigIncludePHP	 = '../libs/myphplib.php';
To include more than one php file:

Code: Select all

$nuConfigIncludePHP	 = ['../libs/myphplib1.php','../libs/myphplib2.php']; 
Likewise, to include JavaScript files, assign the files to $nuConfigIncludeJS and for CSS files use $nuConfigIncludeCSS.
Post Reply