Settings (these are read only for command line usage)
- $GLOBALS[“pnkit_data_dir”]: Location of MB data, logging etc. Default is <user home>/pnkit_data_dir for Synology/Linux command line, <document root>/pnkit_data_dir for web PHP (assuming pnkit is installed in the document root as well) and %APPDATA%/pnkit_data_dir for Windows.
- $GLOBALS[“pnkit_owner_ip”]: IP address that is allowed to use the “INTERACTIVE PORTABLE NKIT”. Default is the IP of Nico de Vries (the N of pnkit).
- $GLOBALS[“pnkit_classic”]: If set, emulates globalvars and sends a ISO-8859-1 header to keep old code running unaltered (not recommended). Default (not classic) is UTF-8 header.
Interactive Portable NKIT
- Add ?pnkit to any pnkit based URL to activate “INTERACTIVE PORTABLE NKIT” (list and edit files, eval, look at the log, …). Relies on $GLOBALS[“pnkit_owner_ip”] for security.
Main PHP functions
- &MB_Ref ($table, $key), MB_Flush (), MB_Query ($table, $constraint=’1==1′, $sort=’$key’).
- MB_Save ($table, $key, $object), MB_Load ($table, $key), MB_Delete ($table, $key), MB_AllKeys ($table).
- N_Encode64 ($string), N_Decode64 ($string), T_EO ($object) , N_Hexdump ($data), N_GUID(), N_Year(), N_Regexp ($string, $patern, $index=1).
- N_Cache ($hours, $func, …), N_GetPageFromGoogleCache ($url), N_GoogleFindSite ($q), N_GoogleFindSiteCache ($q), N_GetPage ($url).
- N_BR(), N_CLI(), N_Windows(), N_Human(), N_Log ($me).
puuse(“backup”)
- BACKUP_Create ($backuplocation, $sqlbackuplocation, $sqlid, $sqlpwd, $dirstobackup)
puuse(“sys”)
- SYS_SH ($cmd)
- SYS_GrepPHP ($qry)
puuse(“lua”) – example (requires LUA to be installed)
puuse ("lua");
T_EO (LUA ('
print (input["aap"])
output={}
output["mies"] = 123
print (output["mies"])
', array("aap"=>"noot")));