搜尋
首頁後端開發php教程PHP行動互聯網開發之環境建置及配置

PHP行動互聯網開發之環境建置及配置

Mar 19, 2017 am 09:29 AM
phpphp教程影片教學

[導讀] 一、PHP5 4環境搭配基本流程Apache:Web服務提供者。官方網站:www apache orgPHP: 官方網站:www php netMysql: 官方網站:www mysql com二、軟體下載Apache下載位址:http:  download csdn net detail lxq_xsyu 7057423PHP

#  #   Apache:Web服務提供者。官網:www.apache.org

PHP: 官網:www.php.net

Mysql:  官網:www.mysql.com

Apache下載網址:http://download.csdn.net/detail/lxq_xsyu/7057423PHP行動互聯網開發之環境建置及配置

PHP下載位址:http://download.csdn.net/detail/lxq_xsyu/7057401

Mysql下載位址:http://download.csdn.net/detail/lxq_xsyu/6468461

(1)Apache安裝

安裝成功PHP行動互聯網開發之環境建置及配置

(2)解壓縮PHP5.4PHP行動互聯網開發之環境建置及配置

#(3)設定Apache的httpd.conf檔PHP行動互聯網開發之環境建置及配置

Apache安裝目錄PHP行動互聯網開發之環境建置及配置 

#ServerRoot "D:/Apache Software Foundation"  


## 
  1. 監聽埠
  2.  

  3. #Listen 12.34.56.78:80  
#Listen 12.34.56.78:80  

  1.  
  2.  


Listen 80  

     
  1. 載入PHP元件

     

##LoadModule php5_module " D:/php54/php5apache2_2.dll"  



  1. # 伺服器名稱
 


#ServerName www.meritit.com:80  


  1. # 文件根目錄

     
  2. DocumentRoot "D:/Apache Software Foundation/htdocs"  



# 權限資料夾   

  1. #  





  1. #

    索引(預設存取首頁)
  2.  

  3.   





  1. ##    DirectoryIndex index.html  

  2. ###  ########### ################### 錯誤日誌 ###### ############ErrorLog "logs/error.log"  ####################### ##### 存取日誌### ###### ###############CustomLog "logs/access.log" common  ############################################################################### ############ 設定解析php ###### ### ################AddType application/x-compress .Z  ################# ############AddType application/x-gzip .gz .tgz  ###########################AddType application/x-httpd-php .php  ##################################################### 錯誤類型 ###### ### ################ErrorDocument 500 "The server made a boo boo."  ############ ################ErrorDocument 404 /missing.html  ##################################################################################### ErrorDocument 404 "/cgi-bin/missing_handler.pl"  ############################ErrorDocument 402 http://www.meritit.######ErrorDocument 402 http://www.meritit.######ErrorDocument 402 http://www.meritit.######ErrorDocument 402 http://www.meritit.######ErrorDocument 402 http://www.meritit.######ErrorDocument 402 http://www.meritit。 com/subscription_  ############################### ###########新a.php# ##### ############
  3. ?>  


PHP行動互聯網開發之環境建置及配置

#

  1.  

  2. 可以看到找不到php的設定文件,我們在apache設定檔中指定一下php的設定檔目錄
  3.  

PHPIniDir "D:/php54"  

PHP行動互聯網開發之環境建置及配置

  1. #

  2.  

  3. # Virtual hosts  



  1. ##Include conf/extra/httpd-vhosts.conf  

  2. 去掉上面註解(開啟虛擬主機設定檔)
  3.  

    在httpd-vhosts.conf中設定了兩個網站如下
  4.  

  5. #  


  6.     DocumentRoot "D:/Apache Software_ Found  DocumentRoot "D:/Apache Software_ Found  DocumentRoot "D:/Apache Software_ Found/aa"#com"


  7. #    ServerName 127.0.0.2  






  8.     ServerAlias www.dummy-host.meritit.com  


  9.     ErrorLog .meritit.com-error.log"  


  10.     CustomLog "logs/dummy-host.meritit.com-access. log" common  


  11. #  






  1.   


  2.     DocumentRoot "D:/Apache Software Foundation/b_com"  


  3.     ServerName 127.0.0.3  


#    -host2.meritit.com-error.log"  

PHP行動互聯網開發之環境建置及配置

    CustomLog "logs/dummy-host2.meritit.com- access.log" common  PHP行動互聯網開發之環境建置及配置

PHP行動互聯網開發之環境建置及配置

#  

PHP行動互聯網開發之環境建置及配置

PHP行動互聯網開發之環境建置及配置

PHP行動互聯網開發之環境建置及配置

PHP行動互聯網開發之環境建置及配置

PHP行動互聯網開發之環境建置及配置

################ ##############注意:一旦配置了虛擬主機,前面配置的DocumentRoot就無效了。 ######D:PHP行動互聯網開發之環境建置及配置Apache Software FoundationPHP行動互聯網開發之環境建置及配置a_comPHP行動互聯網開發之環境建置及配置a.php###### ############  ############################ D:PHP行動互聯網開發之環境建置及配置Apache Software FoundationPHP行動互聯網開發之環境建置及配置b_comPHP行動互聯網開發之環境建置及配置b.php################  ##################?>  ###################?>  ###################?>  ###################?>  ####### #################### ######注意:要修改權限資料夾目錄####### 存取結果:##################################一、PHP5.4環境搭配基本流程##### # ###Apache:Web服務提供者。官網:www.apache.org### ###PHP: 官網:www.php.net### ###Mysql:  官網:www.mysql.com### ###############二、軟體下載####### ###Apache下載網址:http://download.csdn.net/detail/lxq_xsyu/7057423### ###PHP下載網址:http://download.csdn.net/detail/lxq_xsyu/7057401### ###Mysql下載網址:http://download.csdn.net/detail/lxq_xsyu/6468461#########三、環境建置###### ###(1)Apache安裝### ########## ###安裝成功### ########## ###(2)解壓縮PHP5.4#### ########## ###(3)設定Apache的httpd.conf檔### ########## ###Apache安裝目錄### ### ###
  1. ServerRoot "D:/Apache Software Foundation"  



  1.  

    監聽埠
  2.  


  3. #Listen 12.34.56.78:80  

 

 
  1. Listen 80  

  1. #
  2.  


     
#

載入PHP元件

 

  1. LoadModule php5_module "D:/php54/php5apache2_2.dll"  


  1. # 伺服器名稱
  2.  


     


#ServerName www.meritit.com:80  

  1. 文件根目錄
  2.  
  3.  

  4. DocumentRoot "D:/Apache Software Foundation/htdocs"  


  5. 權限資料夾
  6.  

     

  7.   





    ##
  1. 索引(預設存取首頁)

     

    #
  2.  

  3.   

  4.     DirectoryIndex index.html
  5. #    DirectoryIndex index.html# 

    ##    DirectoryIndex index.html#


  6. #  


  1. # # 錯誤日誌
  2.  

     

  3. ErrorLog "logs/error.log"  


  4. 存取日誌

     
  5.  

  6. CustomLog "logs/access.log" common  



配置解析php

 

 

AddType application/x-compress .Z  

  1. AddType application/x-gzip .gz .tgz  

  2. #AddType application/x-httpd-php .php  


  3. #
  4. 錯誤類型
 PHP行動互聯網開發之環境建置及配置
 

#ErrorDocument 500 "The server made a boo boo."  

  1. ##ErrorDocument 404 /missing.html  

PHP行動互聯網開發之環境建置及配置

#ErrorDocument 404 "/cgi-bin/missing_handler.pl"  







  1. #'

  2. ########ErrorDocument 402 http://www.meritit.com/subscription_  ################ ########## ###### #########四、測試是否搭建成功###### ###### ###新建a.php### ### ### #########  ######################## ######### ### ###可以看到找不到php的設定文件,我們在apache設定檔中指定一下php的設定檔目錄### ### ### #########PHPIniDir "D:/php54"  ######################## ############ #########五、設定多站點存取###### ###### ### ### ########## Virtual hosts  ###########################Include conf/extra/httpd-vhosts.conf  # ######################## 去掉上面註解(開啟虛擬主機設定檔) ### ### ###在httpd-vhosts.conf中配置了兩個網站如下### ### ### #########  ##########################    DocumentRoot "D:/Apache ###    DocumentRoot "D:/Apache Softwarewarewareware Foundation/a_com"  ############################    ServerName 127.0.0.2  ############### ############    ServerAlias www.dummy-host.meritit.com  ###########################   "logs/dummy-host.meritit.com-error.log"  ###################
  3.     CustomLog "logs/dummy-host.meritit.com-access.log" common  





  4. #1
      






  5.   

    DocumentRoot "D:/Apache Software Foundation/b_com"  

  1.     ServerName 127.0.0.3  

  2.     ErrorLog "logs/dummy-host2.meritit.com-error.log"  





PHP行動互聯網開發之環境建置及配置

PHP行動互聯網開發之環境建置及配置

PHP行動互聯網開發之環境建置及配置

################################################# ###########    CustomLog "logs/dummy-host2.meritit.com-access.log" common  ######################1 #####  ######################## ######注意:一旦配置了虛擬主機,前面配置的DocumentRoot就無效了。 ### ###D:PHP行動互聯網開發之環境建置及配置Apache Software FoundationPHP行動互聯網開發之環境建置及配置a_comPHP行動互聯網開發之環境建置及配置a.php#### ### ### #########  ####################### D:PHP行動互聯網開發之環境建置及配置Apache Software FoundationPHP行動互聯網開發之環境建置及配置b_comPHP行動互聯網開發之環境建置及配置b.php############  #################? ############## ### ### ###注意:要修改權限資料夾目錄### 訪問結果: ######### ########## ############

以上是PHP行動互聯網開發之環境建置及配置的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
可以在PHP會話中存儲哪些數據?可以在PHP會話中存儲哪些數據?May 02, 2025 am 12:17 AM

phpsessionscanStorestrings,數字,數組和原始物。

您如何開始PHP會話?您如何開始PHP會話?May 02, 2025 am 12:16 AM

tostartaphpsession,usesesses_start()attheScript'Sbeginning.1)placeitbeforeanyOutputtosetThesessionCookie.2)useSessionsforuserDatalikeloginstatusorshoppingcarts.3)regenerateSessiveIdStopreventFentfixationAttacks.s.4)考慮使用AttActAcks.s.s.4)

什麼是會話再生,如何提高安全性?什麼是會話再生,如何提高安全性?May 02, 2025 am 12:15 AM

會話再生是指在用戶進行敏感操作時生成新會話ID並使舊ID失效,以防會話固定攻擊。實現步驟包括:1.檢測敏感操作,2.生成新會話ID,3.銷毀舊會話ID,4.更新用戶端會話信息。

使用PHP會話時有哪些性能考慮?使用PHP會話時有哪些性能考慮?May 02, 2025 am 12:11 AM

PHP会话对应用性能有显著影响。优化方法包括:1.使用数据库存储会话数据,提升响应速度;2.减少会话数据使用,只存储必要信息;3.采用非阻塞会话处理器,提高并发能力;4.调整会话过期时间,平衡用户体验和服务器负担;5.使用持久会话,减少数据读写次数。

PHP會話與Cookie有何不同?PHP會話與Cookie有何不同?May 02, 2025 am 12:03 AM

PHPsessionsareserver-side,whilecookiesareclient-side.1)Sessionsstoredataontheserver,aremoresecure,andhandlelargerdata.2)Cookiesstoredataontheclient,arelesssecure,andlimitedinsize.Usesessionsforsensitivedataandcookiesfornon-sensitive,client-sidedata.

PHP如何識別用戶的會話?PHP如何識別用戶的會話?May 01, 2025 am 12:23 AM

phpIdentifiesauser'ssessionSessionSessionCookiesAndSessionId.1)whiwsession_start()被稱為,phpgeneratesainiquesesesessionIdStoredInacookInAcookInAcienamedInAcienamedphpsessIdontheuser'sbrowser'sbrowser.2)thisIdallowSphptpptpptpptpptpptpptpptoretoreteretrieetrieetrieetrieetrieetrieetreetrieetrieetrieetrieetremthafromtheserver。

確保PHP會議的一些最佳實踐是什麼?確保PHP會議的一些最佳實踐是什麼?May 01, 2025 am 12:22 AM

PHP會話的安全可以通過以下措施實現:1.使用session_regenerate_id()在用戶登錄或重要操作時重新生成會話ID。 2.通過HTTPS協議加密傳輸會話ID。 3.使用session_save_path()指定安全目錄存儲會話數據,並正確設置權限。

PHP會話文件默認存儲在哪裡?PHP會話文件默認存儲在哪裡?May 01, 2025 am 12:15 AM

phpsessionFilesArestoredIntheDirectorySpecifiedBysession.save_path,通常是/tmponunix-likesystemsorc:\ windows \ windows \ temponwindows.tocustomizethis:tocustomizEthis:1)useession_save_save_save_path_path()

See all articles

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱工具

DVWA

DVWA

Damn Vulnerable Web App (DVWA) 是一個PHP/MySQL的Web應用程序,非常容易受到攻擊。它的主要目標是成為安全專業人員在合法環境中測試自己的技能和工具的輔助工具,幫助Web開發人員更好地理解保護網路應用程式的過程,並幫助教師/學生在課堂環境中教授/學習Web應用程式安全性。 DVWA的目標是透過簡單直接的介面練習一些最常見的Web漏洞,難度各不相同。請注意,該軟體中

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser是一個安全的瀏覽器環境,安全地進行線上考試。該軟體將任何電腦變成一個安全的工作站。它控制對任何實用工具的訪問,並防止學生使用未經授權的資源。

mPDF

mPDF

mPDF是一個PHP庫,可以從UTF-8編碼的HTML產生PDF檔案。原作者Ian Back編寫mPDF以從他的網站上「即時」輸出PDF文件,並處理不同的語言。與原始腳本如HTML2FPDF相比,它的速度較慢,並且在使用Unicode字體時產生的檔案較大,但支援CSS樣式等,並進行了大量增強。支援幾乎所有語言,包括RTL(阿拉伯語和希伯來語)和CJK(中日韓)。支援嵌套的區塊級元素(如P、DIV),

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

將Eclipse與SAP NetWeaver應用伺服器整合。