Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

[Added] nuconfig.php: Including external Files

Information about updates, news, Code Library
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 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