Practice: PHPGTK (reprinted ). Actual practice: PHPGTK (reprinted) published in 2002-2-1915: 25PHP programming ghost returned to the layout before PHP is considered to be only used to write CGI programs on the server, if PHP is able to develop PHP/GTK in Windows)
Published on at PM in PHP Programming Forum
In the past, PHP was considered to be only used to write CGI programs on the server. If PHP can develop GUI (Graphical User Interface) programs in Windows, do you believe this? Recently, the PHP development team has successfully developed a PHP program bound with GTK +, so you can develop GUI programs in Windows.
1. create a PHP/GTK runtime environment:
In fact, the GUI program is no different from the common PHPCGI program, but the PHP/GTK program is generated by the GTK class to generate the GUI. They are also open source code and rely on PHP to parse and create a window. If you have already set up the PHP debugging environment, it is relatively simple to install the PHP/GTK environment:
1. download php_gtk.dll (this dll file is used to parse the GTK code in the PHP source program) and decompress it to the extension directory of PHP;
2. download other PHP/GTK dll files (6 in total) and decompress them to the system32 directory of Windows;
3. open php. ini: add the "extension = php_gtk.dll" statement at the bottom of "Windows Extensions" in the extended settings section. we recommend that you back up php first. ini to avoid modification failure and invalidate the established PHP runtime environment;
Now the PHP/GTK runtime environment has been established. Of course, you can add "dl ('php _ GTK. dll ') to dynamically load GTK support.
If you have not created a PHP runtime environment, it is easier to install it:
1. download the entire PHP/GTK bundle support package and decompress it to the PHP4 directory of drive C;
2. copy the dll file under the winnt directory to the system32 directory of Windows, and copy the php. ini file to the directory of Windows;
After PHP/GTK is set up, you can run a PHP/GTK program in command line mode: Enter "c: php4php-q gtkprogrampath" in the running state ", change "c: php4php" to PHP. EXE path. "gtkprogrampath" is the path of the PHP/GTK program. For example, "c: php4php-q c: php4sampleshello. php" will run the example "hello world" program included in the PHP/GTK runtime package.
2. Compile the PHP/GTK program:
If you create a PHP/GTK application, and you need to build a PHP running environment on the other computer and use the PHP command line mode for parsing to execute the application, it is too complicated. So how can we compile a PHP/GTK program? After some searches, I found the PHPCompiler software.
PHPCompiler is developed by www.javascode.com (http://www.deskcode.com/phpcompiler), which can compile PHP into an EXE executable file with built-in PHP support. if you want to compile a PHP/GTK program, you must create a runtime environment for PHP/GTK (refer to the previous steps ). To compile a PHP/GTK program, follow these steps:
Published on at, the PHP programming Forum returned to the layout. Previously, PHP was considered to be only used to compile CGI programs on the server side. If PHP can develop Windows programs...