Actual combat PHP/GTK (reprint) _php Tutorial

Source: Internet
Author: User
Tags gtk
Actual combat PHP/GTK (reprint)
Diao Chan Posted in 2002-2-19 15:25 PHP programming ← Back to Layout
Previously PHP was supposed to be used only to write server-side CGI programs, if PHP can develop a GUI (graphical user interface) program under Windows, do you believe it? Recently, the PHP development team successfully developed a bundle of GTK + PHP, then you can develop a GUI program under Windows.
First, the establishment of PHP/GTK operating environment:
In fact, GUI program and ordinary phpcgi program no difference, but PHP/GTK program by GTK class to generate GUI interface, they are also open source code, rely on PHP to parse the build window. If you have set up a debugging environment for PHP, it is easier to install the PHP/GTK environment:
1. Download Php_gtk.dll (This DLL file is used to parse the GTK code inside the PHP source program) and unzip it to the PHP extension (extension) directory after downloading;
2, download the other PHP/GTK DLL files (altogether 6), unzip them into the Windows System32 directory;
3, open php.ini, in the Extended Settings section "Windows Extensions" the bottom of the "Extension=php_gtk.dll" statement, it is recommended to back up the php.ini, to avoid the failure of the modification of the establishment of a good PHP running environment obsolete;
Now we have established the PHP/GTK environment. Of course, you can also add "DL (' Php_gtk.dll ')" to the first line of each PHP/GTK program source code instead of the second step to dynamically load GTK support.
If you have not yet built a PHP runtime environment, it is easier to install:
1, download the entire PHP/GTK bundle support package, and then unzip them to the C-drive under the PHP4 directory;
2. Copy the DLL files from the Winnt directory to the Windows System32 directory and copy the php.ini files to the Windows directory;
After the PHP/GTK is established, you can run a PHP/GTK program with command-line php: Enter "C:php4php-q Gtkprogrampath" in the Run, where "c:php4php" is changed to PHP.EXE path, " Gtkprogrampath "is the path to the PHP/GTK program. For example, "C:php4php-q c:php4sampleshello.php" will run the example "Hello World" program that accompanies the PHP/GTK run package.
Second, compile the PHP/GTK program:
If you make a PHP/GTK application, you need the other person's computer to build PHP environment and use the PHP command line mode to parse to be able to execute, it is too complex. So how is it possible to compile a PHP/GTK program? After a search, the author found phpcompiler this software.
Phpcompiler is developed by (Http://, PHP can be compiled into EXE executable file, built-in PHP support, if you want to compile a php/ GTK program, you must establish the operating environment of the PHP/GTK (refer to the previous steps). The steps to compile a PHP/GTK program are as follows: true techarticle actual combat PHP/GTK (reprint) Diao greedy Posted in 2002-2-19 15:25 PHP programming ← Back to the canvas before PHP was considered to be used only to write server-side CGI programs, if PHP can develop Windows ...

  • 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: 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.