It is possible to develop a desktop application using PHP with the help of PHP Desktop. Then what is is PHP desktop ..?
All popular PHP frameworks are supported, see the PHP frameworks support wiki page for example configurations for,
Frameworks. Also visit the this link https://github.com/cztomczak/phpdesktop/wiki/PHP-frameworks-support
for PHP frameworks support.
Okey Friends lets go through the steps to create the desktop applicartion, please follow below steps,
Step 1 – Download phpdesktp
Please click here to download the phpdesktop. Visit the download section to download it. Unzip the file and rename the folder as myApp and move the folder where you want to place your desktop application.
Step 2- Create your own php page
Then open www folder of your myApp directory and remove all files and create a new file, name as index.php. write some php code here and save it.
For example your index.php is like
<html> <body> <h1>This is my First php desktop application</h1> </body> </html>
Step3 – Run the application
click phpdesktop-chrome.exe in myApp directory. Which opens a new window, this is the desktop app that we created.
There also shows the console box.
To disable the console box, open settings.json file in your root directory, find debugging and change the value of show console to false (default its value is true). If you want to change your application name just rename title under main window also we can adjust window size etc. just go through with it.
Step 4 – Create the launcher or shortcut for our desktop application
Each time you need to open your application folder and click phpdesktop-chrome.exe to run the desktop application. To avoid this we need to create a launcher or shortcut for our application. Using Inno software we can create the launcher of our application. To install Inno software please click download button. Install inno.
Please read below section to create the launcher using inoo,
- click file->new
- open a new box and change application name,version ,then click next->
- here browse exe file(ie phpdesktop-chrome.exe) from you myApp and then click add folder button and browse myApp folder(select the folder of application to create the launcher), then click next->
- select the language, click next->
- browse the path where you want to create the launcher or shortcut, then click finish.
- Compile the new script.
- Check the path, that you browse to create the launcher.
- Double click the shortcut and you can see that your desktop application works fine.
I hope its works fine. If you have any doubt, please comment on comment section.
Thanks for reading this article…..