What is phplet? Very simple, it is a web server written in PHP, which can replace our common Apache or IIS. Why introduce phplet? Because it is a shortcut that PHPER learns the principle of Web server. Because its program structure is very good, there is a good reference value similar to the object-oriented programming of Java. Because I think PHP5 and phpleton have released a stable version, PHP5 PHPLET SQLITE (PPS) will be a small application, and another option for program demonstration. Most of the small applications or program demonstrations are all EXE or RPM installation packages to the Apache PHP MySQL (APM structure), which is about 8m to 45m. If the entire system is used to use the PPS structure, it will be reduced to 2-3m (SQLite is an embedded database), and the dependence on Apache and MySQL will be saved. PHPLET's way of operation? PHPLET uses PHP_SOCKTES.DLL to implement port listens. Phplet is resident memory, you can run it as NT service using SRVANy.exe. The multifunction function of the phplet can only run in Linux, FreeBSD, * UNX system, etc., because PHP's "process control library" does not support Win32 platforms. Ok, not much nonsense, go to our phplet tour immediately. I. Resource Download: l phpzip-format: http://cn.php.net/download/tgz-format: http://cn.php.net/download/ To download the latest stable version, this will get better Performance and stability. I use php4.3.6, and PHP5 is still in the test phase when writing this document. To download the zip package, it is not a installation package, because the installation version (actually a simplified version) does not have the DLL dynamic link library we need. L phpletzip-format: http://phplet.sourceforge.net/tgz-format: http://phplet.sourceForge.net/ To download the latest stable version, this will get better performance and stability. I use phplet0.0.7, there is no stable version when writing this document. Second. Installation: l PHP decompression to D: PHP4: If you are a beginner, it is best to release the directory I said, otherwise it will bring some trouble. Create a CLI_PHP.EXE: Copy D: php4cliphp.exe to D: php4cli_php.exe. It is a PHPLET launcher, copied to D: PHP4 is to share php.ini with php.exe. PEAR installation: phplet extends the PEAR class library, then let's install PEAR first. The premise is that your computer is connected, because the installer needs to download a part of the component (not studying how to download). In addition, your identity must be Administrator because the Pear.ini is created in the Windows directory in the installer. Everything is ready to run D: php4go-pear.bat began to install.
The first step. Press the Enter directly (or Ctrl C exit: d): Welcome to Go-Pear! Go-Pear Will Install the 'pear' Command and all the files needed by t Command is your tool for pear installation . and maintenance Go-pear also lets you download and install the PEAR packages bundledwith PHP: DB, Net_Socket, Net_SMTP, Mail, XML_Parser, PHPUnit-0.6.2 If you wish to abort, press Control-C now, or press Enter to. Continue: Step 2. Enter the PEAR download address: Use to specify the download address and port of the Pear component, you can press Enter. HTTP proxy (http: // user: password@proxy.myhost.com: port), or enter for none :: third step. PHP path setting: A total of 7 items, enter the corresponding serial number to modify, enter "all" It is all modified, and only the seventh item needs to be modified in general. When you select Section 7, a Windows selection directory dialog box will pop up, select D: PHP4. Below is a suggested file layout for your new PEAR installation Tochange individual locations, type the number in front of thedirectory Type 'all' to change all of them or simply press Enter toaccept these locations 1. Installation prefix:... D: PHP4 2 . Binaries directory: $ prefix 3. PHP code directory ($ php_dir): $ prefixpear 4. Documentation base directory: $ php_dirdocs 5. Data base directory: $ php_dirdata 6. Tests base directory: $ php_dir ests 7. php.exe path: 1-7, 'All' or Enter to Continue: 4. Confirm: Confirm that some components are installed, here is "Y" because phplet is being used by them. The Following Pear Packages Are bundled with php: db, net_socket, net_smtp, mail, xml_parser, phpUnit-0.6.2.would you like to install these as well? [Y / N]: 5. Install or download components: Next please A a few minutes, the installer will automatically download the components and install it. If the "phpUnit-0.6.2" download error will report an error, then check your network connection.
(As long as the network is normal, there will be no problem, you can visit http://pear.php.net) Loading Zlib: Okusing local package: pear ........... Okusing local package: Archive_tar ... Okusing local package: console_getopt .... Okusing local package: XML_RPC ........ okbootstrapping: pear ................ ... (local) okbootstrapping: archive_tar ............ (local) okbootstrapping: console_getopt ......... (local) Okusing local package: DB ... ......... okusing local package: net_socket ....... Okusing local package: net_smtp ......... Okusing local package: mail .......... ... Okusing Local Package: XML_Parser ....... okdownloading package: phpUnit-0.6.2 .... ok, here PEAR has been installed. Modify php.ini: Remove d: php4php.ini-distth to php.ini, then open. Found:; Windows: "Path1; Path2"; Include_Path = "; C: phpincludes" changed to:; windows: "Path1; Path2" incrude_path = ".; D: php4includes; d: php4pear" Find: extension_dir = ". / "Change to: extension_dir =" d: php4extensions "found:; extension = php_sockets.dll change to: eXtension = php_sockets.dll l phplet unzipped to D: php4phplet: If you are a beginner, it is best to release the directory I said. Otherwise, there will be some troubles.