<!-- [if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning/> <w:DrawingGridVerticalSpacing>7.8 pt</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:SpaceForUL/> <w:BalanceSingleByteDoubleByteWidth/> <w:DoNotLeaveBackslashAlone/> <w:ULTrailSpace/> <w:DoNotExpandShiftReturn/> <w:AdjustLineHeightInTable/> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:UseFELayout/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!-- [if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><!-- [if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:標準の表; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]-->
安排目錄結構並設定環境變數
和之前一樣,我打算把相關的程式放在 D:/AppServ 底下,而檔案庫則放在 D:/Repository 底下。以下是我所規劃的目錄結構:
D:
|
|- AppServ ( 伺服器相關程式 )
|
|
| |- Apache2.2 ( Apache 的主要程式檔 )
|
|
| |- php ( PHP 的主要程式檔 )
|
|
| |- mysql ( MySQL 的主要程式檔及資料檔 )
|
|- WEB
|
|
| |- wwwroot ( 預設網站的主要根目錄 )
|
|- Temp
|
|- php ( 讓 PHP 存放暫存檔案的地方 )
|
|- upload ( 上傳檔案的暫存位置 )
|
|- session ( Session 檔的暫存位置 )
|
|- xdebug ( Xdebug 分析檔的存放位置 )
這裡我會把預設網站的根目錄放在 D:/WEB/wwwroot ,各位可以依自己的喜好決定它的位置。
接著把 Apache 、 PHP 及 MySQL 的執行檔所在路徑預先加入系統變數 PATH 裡,這樣方便到時候直接使用指令來設定服務,如下:
D:/AppServ/Apache2.2/bin;D:/AppServ/php;D:/AppServ/mysql/bin;%SystemRoot%....
註:放在 D: ( 或其他非 C: 分割區) 的好處是不用擔心重灌後,資料及相關設定會消失。