SartajPHP is a PHP framework for web applications, Command Line Application, Desktop Application with Hybrid Technology and Mobile Application with Hybrid and Ajax Platform. This PHP Framework used event oriented programming techniques. It is full flexible framework where you can build any type of application like MVC, Component Oriented, API, Multi Tier, Cross Platform, Web Service, plugin or extension for another PHP Frameworks, wrapper for another PHP frameworks or applications or your new things. This PHP Framework has lots of reusable PHP components. SartajPHP is giving life to lots of web,desktop and mobile applications.
For more info see:- https://github.com/sartaj-singh/vscode-sartajphp-intellisense
- Install SartajPHP + Sphp Server with NPM JS Package).
How to install Sphp Server binary package?
- With NPM:----
npm install -g sphpdesk
- After Installation run command
npx sphpdesk
or direct call if symlink work, sometime nmp doesn't create symlink for binary
sphpdesk
It runs default project inside res folder. If you want to run directly sphpserver then you can create a symlink inside your bin folder. For run with double click on file app.sphp, you need to register .sphp file type with sphpserver application. Right click on app.sphp file and select open with and choose sphpserver application path.OR you can install on your desktop with installation file inside res/sphpserver folder
- Install SartajPHP with Composer or download zip file from github(see GitHub).
How to install it?
With Composer:----
Add to your composer.json:
{
"require": {
"sartajphp/sartajphp": "dev-master"
}
}
Then
composer install
OR
composer update
With Download Zip file from github :--------
After download copy res and demo folder in your root folder. res folder is called framework folder and demo folder is called project folder. You can create your component, classes etc. all reusable code in res folder and customized or project related code in project folder. Learn more:- SartajPHP Website
- Run Desk App mode:- sphpdesk proj_dir/app.sphp
- Run Server App mode:- sphpdesk --proj proj_dir
- Read Settings from app.sphp and you can change running mode of sphpserver
You can over-write these settings with console arguments:- "project": Name of project, "type": Run Mode:- srvapp or deskapp or consoleapp, "host": "localhost", "port": 0 : port number to serve server "secure": 0 : no https "php": "php": use system installed PHP or "" "browser": "default":- System Default or "$exepath/browser/nw" your custom browser or "" empty for inbuilt browser, these browser need libraries installed on system like WebView2 on windows and GTK3, WebKitGTK on linux
browser command line arguments example:- "browserparam": ["--url=$url"], "browserparam1": ["--allow-file-access-from-files", "--disable-web-security", "--user-data-dir=$projpath/cache","--app=$url", "--disable-features=CrossSiteDocumentBlockingIfIsolating"], "browserparam2": ["--app=$url"], "browserparam3": ["--new-window", "$url"]
command line example:- ./sphpserver-linux --proj "/home/admin/web/domain.com/public_html" --type "srvp3" --port 8001 --host "domain.com" --php "php" --key "/home/admin/conf/web/ssl.domain.com.key" --cert "/home/admin/conf/web/ssl.domain.com.crt" --ca "/home/admin/conf/web/ssl.domain.com.pem"
- Read the Getting Started guide if you are new to SartajPHP.
- Video Tutorial on Youtube SartajPHP Video Tutorial to learn SartajPHP practically.
- Latest API
For Contribute and Support us please contacts on our Facebook Page
If you discover a security vulnerability within SartajPHP PHP Framework, please contacts us Facebook Page.