TAILIEUCHUNG - PHP Developer's Dictionary- P10

PHP Developer's Dictionary- P10:PHP is an open source, server-side, HTML-embedded scripting language used to create dynamically generated Web pages. With an easy-to-use syntax and a large, extensible library of modules, PHP brings together the best of Perl, C++, and other languages. | PHP Developer s Dictionary Chapter 3. Database Access This chapter discusses setting up a database. More specifically it discusses setting up a PostgreSQL database and using that database to store information that will be made available to Web browsers. Many open-source applications are available to Web developers. This chapter assumes that you have an Apache Web server configured to use PHP and that your configuration of PHP is compiled to integrate with PostgreSQL. Examples of this configuration are detailed in Chapter 1 Basic PHP. Working with Connections and Data Sources The standard PostgreSQL installation uses port 5432 to listen for TCP IP connections. This is the port on which the postmaster process listens for connections. The postmaster is the process that manages the communications between the front-end clients and the back-end server. For the examples included in this book it is assumed that the port is left at the default 5432. In other words the connections made to the PostgreSQL back end are assumed to be on port 5432. You will see how to make this connection using PHP later in this chapter. Setting Up the Database Initial installation andconfiguration of the PostgreSQL package is beyond the scope of this chapter. Please refer to the PostgreSQLWeb site http for installation and configuration documentation. This section describes the initial creation of the test database that will be used in the remainder of the examples in this chapter. The first thing to do is check your PostgreSQL installation for the existence of a database named test. All the examples in this chapter refer to this test database if this database already exists you might want to create a database with a different name. To check for the existence of a test database use the following command psql -l The psql application is the PostgreSQL client that is used to interact with the backend. The -l option lists the available databases. Your output should look similar to

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.