neoPhp
Version: 3.8
Server side php commands. Allows using databases and much more.
This plugin needs a neoPHP Server running in order to work properly.
Compile the app before testing!
Test from local server (localhost or local IP in URL).
Sample App:
https://visualneo.com/tutorials/neoPhpDb1
https://visualneo.com/tutorials/phonelisting
(User: admin - Pass: admin)
How to load and save content on server:
How to create a database App step by step using neoPhp:
https://www.youtube.com/watch?v=jIAN5B2dSl0&list=PL0I-4WLYvbmg0uBSo6jabSg034o8_lbfx
Description
The neoPhp plugin for VisualNEO Web enables powerful server-side capabilities, including database operations, file manipulation, and user authentication. This plugin is ideal for applications requiring dynamic data management, secure data storage, or user login features.
neoPhpUserLogin
|
Purpose: |
Login a registered user into the system Returns a JSON object with user data: id, username, email, level, error (wich would be empty if no error) |
|
Category: |
neoPhp |
|
Syntax: |
neoPhpUserLogin "user" "pass" callbackFn
user User name pass Password callbackFn Callback subroutine (will get json user data as a parameter) |
neoPhpUserLogOut
|
Purpose: |
Log out current user. |
|
Category: |
neoPhp |
|
Syntax: |
neoPhpUserLogOut callbackFn
callbackFn Callback subroutine (optional) |
neoPhpUserInsert
|
Purpose: |
Add a new user in the "users" table. Will create database and table if they don't exist. To be executed an admin user must be logged in (level 0) Return "True" or error message. |
|
Category: |
neoPhp |
|
Syntax: |
neoPhpUserInsert "userName" "userEmail" "userPassword" userLevel callbackFn
userName User name userEmail User email userPassword User password userLevel User level (0=admin, 1=can write, 2=can read) callbackFn Callback subroutine (optional) |
neoPhpUserErase
|
Purpose: |
Erase a user in "users" table. To be executed an admin user must be logged in (level 0) Returns "True" or error message. |
|
Category: |
neoPhp |
|
Syntax: |
neoPhpUserErase userId callbackFn
userId User id callbackFn Callback subroutine (optional) |
neoPhpUserChangePassword
|
Purpose: |
Change the user password. Returns "True" or error message |
|
Category: |
neoPhp |
|
Syntax: |
neoPhpUserChangePassword userId "oldPassword" "newPassword" callbackFn
userId User id oldPassword Old password newPassword New password callbackFn Callback subroutine (optional) |
neoPhpFileCopy
|
Purpose: |
Copy a server file to another file name. A user must be logged in (level 0) Returns "True" or error message. |
|
Category: |
neoPhp |
|
Syntax: |
neoPhpFileCopy "sourceFileName" "destinationFileName" callbackFn
sourceFileName The alias name of an existing file on the server with read permission. destinationFileName The alias name of a file on the server with write permission. callbackFn Callback subroutine (optional) |
neoPhpFileErase
|
Purpose: |
Erase a server file. A user must be logged in (level 0) Returns "True" or error message. |
|
Category: |
neoPhp |
|
Syntax: |
neoPhpFileErase "fileName" callbackFn
fileName File alias name with write permission (ie: myfile) callbackFn Callback subroutine (optional) |
neoPhpFileToVar
|
Purpose: |
Read the contents of a file into a variable. File must have read permission. Returns "True" or "Error" message. |
|
Category: |
neoPhp |
|
Syntax: |
neoPhpFileToVar "fileName" varName callbackFn
fileName File alias name (ie: myfile) varName Var to store the content callbackFn Callback subroutine (optional) |
neoPhpFileWrite
|
Purpose: |
Writes content to a file File must have write permission. |
|
Category: |
neoPhp |
|
Syntax: |
neoPhpFileWrite "fileName" "content" append callbackFn
fileName File alias name (ie: myfile) content Content to write append Append content? (otherwise will replace) callbackFn Callback subroutine (optional) |
neoPhpSetPath
|
Purpose: |
Sets the path to php script (neofunctions.php by default) This is useful if neofunctions.php is published in a remote hosting or you want to change it's name. For remote, remember to uncomment: header("Access-Control-Allow-Origin: *"); |
|
Category: |
neoPhp |
|
Syntax: |
neoPhpSetPath "neophppath"
neophppath Path to neofunctions.php (ie https://mydomain.com/myapp/neofunctions.php) |
neoPhpExecSql
|
Purpose: |
Executes an SQL query in a given database. For SELECT queries, returns a JSON object with the query result. For any other query returns True or error message. |
|
Category: |
neoPhp |
|
Syntax: |
neoPhpExecSql "dbName" "dbQuery" ""params" callBackFn
dbName Database name alias dbQuery SQL query name alias "params Query parameters. Use ""::"" as separator." callBackFn Callback subroutine to get the result (optional) |
neoPhpSetErrorSubroutine
|
Purpose: |
Define the fucntion to be called when no connection is available. |
|
Category: |
neoPhp |
|
Syntax: |
neoPhpSetErrorSubroutine errorFunc timeout
errorFunc Subroutine to call if connection error timeout Timeout in milliseconds (Default 10000) |
Created with the Personal Edition of HelpNDoc: Experience the power of a responsive website for your documentation