1 / 18

Apache & HTML

Apache & HTML. Speaker:Sandra Date: 2013/07/10. Outline. Introduction Web Server Setup apache HTML Text Form References. Web Server. 在 WWW 的服務上,提供使用者所要求網頁內容的伺服器。 提供的網頁內容又可分為靜態網頁跟動態網頁。 根據 Netcraft 在 2013 年 1 月所發表的調查結果,使用 Apache 的比例最高,為 55.26% ,其次為 Microsoft 的 IIS ,為 16.93% 。.

calvin
Download Presentation

Apache & HTML

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Apache & HTML Speaker:Sandra Date: 2013/07/10

  2. Outline • Introduction • Web Server • Setup apache • HTML • Text • Form • References

  3. Web Server • 在WWW的服務上,提供使用者所要求網頁內容的伺服器。 • 提供的網頁內容又可分為靜態網頁跟動態網頁。 • 根據Netcraft在2013年1月所發表的調查結果,使用Apache的比例最高,為55.26%,其次為Microsoft的IIS,為16.93%。 http://news.netcraft.com/archives/2013/01/

  4. Apache HTTP server project • 由Apache Software Foundation所維護的開源網頁伺服器專案。 • 支援Unix、Linux、Windows。 • 能提供靜態、動態的網頁服務,如要達到動態網頁服務,可以安裝PHP搭配上MySQL來完成,如果是安裝在Linux的平台上,通常稱為LAMP (Linux + Apache + MySQL + PHP)。

  5. Install Apache • On Linux (CentOS): • yum install httpd mysql-server php php-devel php-mysql (need root) • On Windows: • Download AppServ • AppServ is a full-featured of Apache, MySQL, PHP

  6. Configuration • 設定檔路徑:/etc/httpd/conf/httpd.conf • DocumentRoot "/var/www/html“ • DirectoryIndex index.html index.html.var index.htm index.php • AddDefaultCharset UTF-8

  7. 建立個人網站目錄 • <IfModule mod_userdir.c> • UserDir disable • UserDir public_html • </IfModule>

  8. 建立個人網站目錄cont. • #mkdir /home/sandra/public_html • #chmod 755 /home/sandra/public_html • #touch /home/sandra/public_html/index.html • http://10.21.21.59/~sandra/

  9. Startup Apache • Command: • /etc/init.d/httpd start|stop|restart • chkconfig httpd on|off • file dictionary: /var/www/ • Apache test page: • http://localhost • http://127.0.0.1 • http://your_IP_address

  10. HTML • HTML (超文字標示語言) • 全名為HyperText Markup Language。 • 具有超文字(HyperText)、超連結(HyperLink)、超媒體(HyperMedia)的特性,透過HTTP通訊協定,便能夠透過WWW的架構做交流。 • 超文字是藉由一些特殊標籤的協助,用來組織文件內容。 • 標示(Markup)是透過在文件中插入標籤(tag)來賦予文字一些特性。

  11. HTML basic format • <html> <head> <title> 網頁的標題 </title> </head> <body> 網頁的內容 </body> </html> 不會顯示的內容 會顯示的內容

  12. Text - Headings • Headings • <h1>Hello World!</h1> • <h2>Hello World!</h2> • <h3> Hello World!</h3> • <h4> Hello World!</h4> • <h5> Hello World!</h5> • <h6> Hello World!</h6>

  13. Text –Hyperlink&Body • <a>…</a> • <a href = "URL"> Description for the link to some URL </a> • Body:Defines the document's body • <body bgcolor="#008000" link="#000000" vlink="#ff0000" alink="#0000ff"> http://www.eion.com.tw/Blogger/?Pid=1008

  14. Text – Paragraphs&Break • <p>…<br>…</p> • Alignment – An Optional Attribute of <p> • <p align="left">Hi<p> • <p align="center">Hello</p> • <p align="right">Good</p> • <p align="justify">Hi,<br>Good morning</p>

  15. Text –Cell table&Row table • <tr>…</tr>:Defines a row in a table • <td>…</td>:Defines a cell in a table • <table width="300" border="1" cellspacing="2" > • <tr> • <td>hi</td> • <td>hello</td> • </tr>

  16. Form • input :Defines an input control • <input type=" checkbox " name=" text"> • button :Defines a clickable button • <button type="reset">clear</button> • select :Defines a drop-down list • <select name=“name">name</select> • option: Defines an option in a drop-down list • <option value="a">a</option> • <option value="b">b</option>

  17. References • Apache HTTP Server Project • http://httpd.apache.org/ • Appserv Open Project • http://www.appservnetwork.com/index.php • WWW伺服器 (鳥哥的Linux私房菜) • http://linux.vbird.org/linux_server/0360apache.php • http://voip.com.ncnu.edu.tw/Summer2012/Apache_HTML.ppt • World Wide Web Consortium (W3C) • http://www.w3schools.com/tags/

  18. Exercise • 安裝Apach並啟動它 • 建立個人網站目錄(public_html) • 使用form以下這幾個功能input、button、select、 option來完成圖1檔名為ex3.html,輸出為ex3.php格式為圖二。 圖一 圖二

More Related