Download presentation
Presentation is loading. Please wait.
Published byAmber Jefferson Modified over 9 years ago
1
1 Web Page Design with PHP Mozafar Bag-Mohammadi
2
2 Outline مفاهیممفاهیم –url و http –dns HTMLHTML –Tag ها، لیست ، جدول و فرم –صفحه آرایی و تنظیم وب PHPPHP –کلیات، نصب و راه اندازی سرور –ساختارهای کنترلی و آرایه –سازماندهی برنامه ها و استفاده مجدد –ارتباط با بانک اطلاعاتی
3
3 ساختار درس نمره دهی:نمره دهی: –امتحان 70% –کوییز 5% –تمرین 15% –پروژه 15% کتاب:کتاب: –اصول طراحی و برنامه نویسی تحت وب- جعفر نژاد قمی
4
4 URI: Universal Resource Identifier Absolute URI: scheme://hostname[:port]/pathAbsolute URI: scheme://hostname[:port]/pathhttp://www.cs.rpi.edu:80/blah/foo Relative URI: /pathRelative URI: /path/blah/foo No server mentioned
5
5 HTTP Usage HTTP is the protocol that supports communication between web browsers and web servers.HTTP is the protocol that supports communication between web browsers and web servers. A “Web Server” is a HTTP serverA “Web Server” is a HTTP server Most clients/servers today speak version 1.1, but 1.0 is also in use.Most clients/servers today speak version 1.1, but 1.0 is also in use.
6
6 HTTP HTTP has a simple structure:HTTP has a simple structure: –client sends a request –server returns a reply. HTTP can support multiple request- reply exchanges over a single TCP connection.HTTP can support multiple request- reply exchanges over a single TCP connection.
7
7 Well Known Address The “well known” TCP port for HTTP servers is port 80.The “well known” TCP port for HTTP servers is port 80. Other ports can be used as well...Other ports can be used as well...
8
8 HTTP 1.0+ Request Lines of text (ASCII).Lines of text (ASCII). Lines end with CRLF “\r\n”Lines end with CRLF “\r\n” First line is called “Request-Line”First line is called “Request-Line” Request-Line Headers. Content... blank line
9
9 Methods GET: retrieve information identified by the URI.GET: retrieve information identified by the URI. HEAD: retrieve meta-information about the URI.HEAD: retrieve meta-information about the URI. POST: send information to a URI and retrieve result.POST: send information to a URI and retrieve result.
10
10 Example GET Request There is a blank line here! GET /~hollingd/testanswers.html HTTP/1.1 Accept: */* Host: www.cs.rpi.edu User-Agent: Internet Explorer From: cheater@cheaters.org
11
11 Example POST Request POST /~hollingd/changegrade.cgi HTTP/1.1 Accept: */* Host: www.cs.rpi.edu User-Agent: SecretAgent V2.3 Content-Length: 35 Referer: http://monte.cs.rpi.edu/blah http://monte.cs.rpi.edu/blah stuid=6660182722&item=test1&grade=99
12
12 HTTP Response ASCII Status LineASCII Status Line Headers SectionHeaders Section Content can be anything (not just text)Content can be anything (not just text) –typically an HTML document or some kind of image. Status-Line Headers. Content... blank line
13
13 Distributed, Hierarchical Database Root servers and TLD servers typically do not contain hostname to IP mappings; they contain mappings for locating authoritative servers.Root servers and TLD servers typically do not contain hostname to IP mappings; they contain mappings for locating authoritative servers. Root DNS Servers com DNS servers ca DNS serversedu DNS servers poly.edu DNS servers umass.edu DNS servers yahoo.com DNS servers amazon.com DNS servers ucalgary.ca DNS servers TLD Servers usask.ca DNS servers
14
14 TLD and Authoritative Servers Top-level domain (TLD) servers: responsible for com, org, net, edu, etc, and all top-level country domains uk, fr, ca, jp.Top-level domain (TLD) servers: responsible for com, org, net, edu, etc, and all top-level country domains uk, fr, ca, jp. –Network solutions maintains servers for com TLD –Educause for edu TLD Authoritative DNS servers: organization’s DNS servers, providing authoritative hostname to IP mappings for organization’s servers (e.g., Web and mail).Authoritative DNS servers: organization’s DNS servers, providing authoritative hostname to IP mappings for organization’s servers (e.g., Web and mail). –Can be maintained by organization or service provider
15
15 requesting host cis.poly.edu gaia.cs.umass.edu root DNS server local DNS server dns.poly.edu 1 2 3 4 5 6 authoritative DNS server dns.cs.umass.edu 7 8 TLD DNS server DNS Infrastructure Host at cis.poly.edu wants IP address for gaia.cs.umass.eduHost at cis.poly.edu wants IP address for gaia.cs.umass.edu Infrastructure:Infrastructure: –Client resolver –Local DNS server –Authoritative DNS Server –Root DNS Server –Top-Level Domain DNS Server
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.