« Home « Chủ đề thiết kế web với php

Chủ đề : thiết kế web với php


Có 220+ tài liệu thuộc chủ đề "thiết kế web với php"

Phát triển web với PHP và MySQL - p 23

tailieu.vn

You can run an existing SQL file, such as one loaded from the CD-ROM, through MySQL by typing. Using file redirection is pretty handy for this because it means that you can edit your SQL in the text editor of your choice before executing it.. customerid int unsigned not null auto_increment primary key, name char(30) not null,. address char(40) not...

Phát triển web với PHP và MySQL - p 24

tailieu.vn

Table 8.10 shows the TEXT and BLOB types. Table 8.11 shows the ENUM and SET types.. SET(‘value1’, 64 Columns of this type can hold a set of the. For more information, you can read about setting up a database at the MySQL online manual at http://www.mysql.com/. Now that you know how to create users, databases, and tables, you can concentrate...

Phát triển web với PHP và MySQL - p 25

tailieu.vn

Let’s look at a few of the more common uses of ALTER TABLE. For example, in our Customers table, we have allowed names to be 30 characters long. We can fix this by changing the data type of the column so that it is 45 characters long instead:. Imagine that a sales tax on books is introduced locally, and that...

Phát triển web với PHP và MySQL - p 27

tailieu.vn

The MySQL parameter max_connections determines what this limit is. You can alter both of these parameters from their default values by editing the config- uration files. If you use persistent connections and nearly every page in your site involves database access, you are likely to have a persistent connection open for each Apache process. This can cause a problem if...

Phát triển web với PHP và MySQL - p 28

tailieu.vn

Making your MySQL database secure. Previously (in Chapter 8, “Creating Your Web Database”) we looked at setting up users and granting them privileges. If you’re going to administer a MySQL database, it can be useful to understand exactly what GRANT does and how it works.. When you issue a GRANT statement, it affects tables in the special database called mysql...

Phát triển web với PHP và MySQL - p 29

tailieu.vn

If you leave the database parameter off, the SHOW COLUMNS statement will default to the data- base currently in use. You can also use the table.column notation:. show columns from books.orders;. One other very useful variation of the SHOW statement can be used to see what privileges a user has. For example, if we run the following, we’ll get the...

Phát triển web với PHP và MySQL - p 30

tailieu.vn

This chapter introduces some of the issues involved in specifying, designing, building, and maintaining an e-commerce site effectively. We will examine your plan, possible risks, and some ways to make a Web site pay its own way.. Types of commercial Web site. Before spending too much time worrying about the implementation details of your Web site, you should have firm...

Phát triển web với PHP và MySQL - p 31

tailieu.vn

As a rule of thumb, if you test your site in the last two versions of Microsoft Internet Explorer and Netscape Navigator on a PC running Microsoft Windows, the last two versions of Netscape Navigator on a Apple Mac, the current version of Netscape Navigator on Linux, and a text-only browser such as Lynx, you will be visible to the...

Phát triển web với PHP và MySQL - p 32

tailieu.vn

To see the path that data takes from you to a particular machine, you can use the command. This command will give you the addresses of the machines that your data passes through to reach that host. For an international machine, there can be more than 20 intermediaries. To protect confidential information, you can encrypt it before it is sent...

Phát triển web với PHP và MySQL - p 33

tailieu.vn

As shown in Figure 13.4, both the sender (who encrypts the mes- sage) and the recipient (who decrypts the message) have the same key.. The most widely used secret key algorithm is the Data Encryption Standard (DES). 2 It uses the same algorithm as DES, applied three times with up to three different keys. One obvious flaw of secret key...

Phát triển web với PHP và MySQL - p 34

tailieu.vn

Having asked for and received information from your visitor, you need a way to associate the information with the same user the next time she visits. If you are willing to make the assump- tion that only one person visits your site from a particular account on a particular machine and that each visitor only uses one machine, you could...

Phát triển web với PHP và MySQL - p 35

tailieu.vn

The code in Listing 14.4 acts in a very similar way to the previous listings in this chapter. As with the code given in Listing 14.1 and 14.2, we could include this code in pages we wanted to protect, or automatically prepend it to every file in a directory.. Using Basic Authentication with Apache’s .htaccess Files. The easiest to use...

Phát triển web với PHP và MySQL - p 36

tailieu.vn

Providing secure transactions using the Internet is a matter of examining the flow of informa- tion in your system and ensuring that at each point, your information is secure. By secure we mean that the level of effort required to compromise a system or transmission is high compared to the value of the information involved.. If we are to direct...

Phát triển web với PHP và MySQL - p 37

tailieu.vn

<html><head><title><My Page</title>…. d><title>. <html><hea y Page</ti. One of the principles of building a safe Web application is that you should never trust user input. We’ve talked in several places throughout this book of techniques you can use to screen user input. The addslashes() function should be used to filter user data before it is passed to a database. You can...

Phát triển web với PHP và MySQL - p 38

tailieu.vn

In order to make this code work for you, you will need to change a few things. will need to be changed to reflect the location of your GPG keyring. On our system, the Web server runs as the user nobody , and has the home directory /tmp/. It will need to be modified to suit you. As with when...

Phát triển web với PHP và MySQL - p 39

tailieu.vn

echo “Problem: no file uploaded”;. echo “Problem: uploaded file is zero length”;. echo “Problem: file is not plain text”;. echo “Problem: possible file upload attack”;. echo “Problem: Could not move file into directory”;. echo “File uploaded successfully<br><br>”;. L ISTING 16.2 Continued. echo “Preview of uploaded file contents:<br><hr>”;. echo “<br><hr>”;. This function is from the PHP manual.. is_uploaded_file is built into...

Phát triển web với PHP và MySQL - p 40

tailieu.vn

You can use the file system functions to create, move, and delete files.. First, and most simply, you can create a file, or change the time it was last modified, using the. This works similarly to the UNIX command touch. If the file already exists, its modification time will be changed either to the current time, or the time given...

Phát triển web với PHP và MySQL - p 41

tailieu.vn

URL: <input type=text name=”url” size=30 value=”http://”><br>. Email contact: <input type=text name=”email” size=23><br>. This is a very simple form—the rendered version, with some sample data entered, is shown in Figure 17.2.. L ISTING 17.2 Continued. Directory submissions typically require your URL and some contact details so directory administrators can notify you when your site is added to the directory.. When the...

Phát triển web với PHP và MySQL - p 42

tailieu.vn

PHP’s FTP library comes with two predefined constants,. You pass it the system filename of the local file you would like to write to rather than a file handle.. After we have finished with the FTP connection, you should close it using the ftp_quit(). If you want to go the other way, that is, copy files from your server to...

Phát triển web với PHP và MySQL - p 43

tailieu.vn

you can pass in 0 s to the hour , minute , and second parameters. You can, however, leave out values from the right side of the parameter list. If you leave the parameters blank, they will be set to the current values. will return the UNIX time stamp for the current date and time. You can pass in a...