顯示具有 PHP 標籤的文章。 顯示所有文章
顯示具有 PHP 標籤的文章。 顯示所有文章

2014年8月19日 星期二

建構Apache2.4.10+PHP5.5.15網際環境 (x64)


相關檔案來源:
httpd-2.4.10-win64-VC11.zip (Apache 2.4.10 Win64)
php-5.5.15-Win32-VC11-x64.zip (VC11 x64 Thread Safe (2014-Jul-24 01:03:51))
vcredist_x64.exe (Visual C++ Redistributable for Visual Studio 2012 Update 4)

相關語法如下

Apache設定檔(httpd.conf):
PHPIniDir "C:/PHP/"
LoadModule php5_module "C:/PHP/php5apache2_4.dll"
AddType application/x-httpd-php .php
DirectoryIndex index.html index.htm index.php

批次啟動檔(Start.bat):
@echo off
bin\httpd.exe -k install -n "Apache2.4"
bin\httpd.exe -k start
start bin\ApacheMonitor.exe

批次停止檔(Stop.bat):
@echo off
bin\httpd.exe -k stop
bin\httpd.exe -k uninstall -n "Apache2.4"
TASKKILL /F /IM ApacheMonitor.exe

PHPInfo程式(phpinfo.php):
<?php phpinfo() ?>

註解:

2012年8月10日 星期五

建構Apache2.4.2+PHP5.4.5網際環境



詳細動態教學如下:
Click me!!

相關檔案來源:
httpd-2.4.2-win32-ssl_0.9.8.zip (Apache 2.4.2 Same as above, except build with OpenSSl 0.9.8x instead of 1.0.1c)
php-5.4.5-Win32-VC9-x86.zip (PHP 5.4 (5.4.5) VC9 x86 Thread Safe)(Old file)
php5apache2_4.dll-php-5.4-win32.zip (VC9 - PHP Handler modules for php 5.4)
vcredist_x86.exe (Microsoft Visual C++ 2010 可轉散發套件 (x86))

相關語法如下

批次啟動檔(Start.bat):
@echo off
bin\httpd.exe -k install -n "Apache2.4"
bin\httpd.exe -k start
start bin\ApacheMonitor.exe

批次停止檔(Stop.bat):
@echo off
bin\httpd.exe -k stop
bin\httpd.exe -k uninstall -n "Apache2.4"
TASKKILL /F /IM ApacheMonitor.exe

Apache設定檔(httpd.conf):
PHPIniDir "C:/PHP/"
LoadModule php5_module "C:/PHP/php5apache2_4.dll"
AddType application/x-httpd-php .php
DirectoryIndex index.phtml index.htm index.html index.php index.php3

PHP設定檔(php.ini):
extension_dir = "C:/PHP/ext"

PHPInfo程式(phpinfo.php):
<?php phpinfo() ?>

2012年8月8日 星期三

VS環境下好用的PHP開發工具VS.PHP



官方網站:PHP IDE for Visual Studio | Jcx.Software Corp.

簡  介:
VS.Php is a PHP IDE (integrated development environment) based on Visual Studio IDE. With VS.Php you can design, develop, debug and deploy PHP applications within the Visual Studio IDE. VS.Php key features are around providing rich PHP editor as well as Smarty editing capabilities. Also is the ability to debug PHP scripts locally as well as remotely.

簡單範例:
Click me!!

範例程式:
<?php
class MyClass
{
    public function hello() {
        for ($i = 0; $i < 10; $i++)
        {
            echo "Hello<br />";
        }
    }
}
$hello = new MyClass();
$hello->hello();
?>