How to develop a Linux desktop application using PHP-php Tutorial

Source: Internet
Author: User
For Linux, use tar. xz to package the php7cli (3 MB) compiled by GCC-O3 and the dependent Library php7libs (7 MB) with a size of about 10 MB.
Because the dependency Library is packaged, it can be decompressed and ready for use. it is applicable to all Linux distributions.
The entire application can be packaged up to 15 MB.
If you do not want to see the source code, you can use tools such as php-beast for encryption.
I packaged PHP7 for 64-bit Linux:

Remove the PHP-FPM and PHP-CGI inside, keep php cli, the entire PHP7 environment is about 10 MB.

Assume that the application is installed in/opt/phppc, and the www under it is used as the root directory to start the HTTP service:
Php-S localhost-t/opt/phppc/www
Access localhost to open the application.

For example, PHP calls the system's built-in command lshw or reads/proc/cpuinfo to get various hardware information, including the real-time CPU running frequency.
PHP can directly write the information returned by the command
Or convert it to an array for exact hash operation and then output. 

In this way, like the probe, you can get hardware information like CPU-Z tools on Windows through the Web interface.

SQLite is used for local storage, and AJAX or WebSocket (Swoole) can be used for browser interaction with local and server ),
When the program is updated, pclose (popen ('Upgrade. php', 'r') opens a CLI process and obtains the update package using file_get_contents () or curl.
Processes can communicate with each other through the file system Mark or SQLite database.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.