What every PHP interview and PHP developer should know

巴扎黑
Release: 2016-11-08 09:35:46
Original
894 people have browsed it

10

Questions



Questions: 1

What are the differences between the storage engines in MySQL? Which one is the default?

Answer: 1

We can look at the storage engines:

1. MyISAM (the default engine of MySQL). Each MyISAM table is divided into three files and stored on the hard disk. The file name starts with indication and has an extension The file name indicates the format of the file. The data file has an index file whose suffix is ​​.MYI. (InnoDB is a transaction-safe (ACID-compatible) storage engine. It has transaction commit, rollback and disaster recovery functions to protect user data.)

3. Merge

4. Heap (MEMORY) (memory storage The engine stores data in memory. We were familiar with the HEAP table before)

5. BDB (BerkeleyDB) (Sleepycat Software Company provides the Berkeley DB transaction storage engine for MySQL. The abbreviation of this engine is BDB. BDB table Has many great features, including disaster recovery and also supports transaction commit and rollback)

6. EXAMPLE

7. FEDERATED (This storage engine accesses remote databases to obtain data rather than accessing local data tables. )

8. ARCHIVE (ARCHIVE storage engine is usually used when huge data is needed in a very small script and there is no index)

9. CSV (CSV storage engine uses comma-delimited format to store data in files)

10. BLACKHOLE (BLACKHOLE storage engine is like a "black hole", it accepts data but throws it out directly and does not store it. The retrieved result set always returns empty)



Question: 2

hearder() What is the role of functions in php?

Answer: 2 The

header() function sends a native HTTP header request to the client. We can use the header() function to redirect web pages. What needs to be noted when using the header() function is that there cannot be any form of output statement before using it.



Question: 3

How to execute a PHP script in the command line?

Answer: 3

Just run the PHP CLI (Command Line Interface) program and provide the PHP script file as a command line parameter.



Question: 4

Assuming that your Zend engine supports
syntax, how to enable it in your configuration?
?>Answer: 4

In php.ini file:

Set

short_open_tag=on



Question: 5

Shopping cart online verification, how to configure Paypal?

Answer: 5

We don’t need to do anything extra, we just need to jump to the PayPal address after submission and provide the data required by PatPal, such as the total price and address.



Question: 6

nl2br() What is this function used for?

Answer: 6

Insert HTML line break tags before all new lines in the string.



Question: 7

htaccess? Where and why do we use it?

Answer: 7

.htaccess file is the configuration file of the apache server, which provides a configuration parameter for each directory. This file contains one or more configuration directives and is placed in a specific directory file. These directives will then apply to this directory and all its subdirectories.



Question: 8

How to get the client’s IP address and the address of the previous page?

Answer: 8

By using $_SERVER[‘REMOTE_ADDR’], $_SERVER[‘HTTP_REFERER’].



Question: 9

What are the reasons for choosing LAMP (Linux, apache, MySQL,

PHP) instead of other languages ​​and operating systems?

Answer: 9

Because LAMP is open source. The security of Linux is much better than that of windows. Apache is stronger than IIS in terms of functionality and security. MySQL is the most popular open source database today. PHP is much faster to develop than ASP or other scripting languages.



Questions: 10

How to encrypt and decrypt data in MySQL tables in MySQL?

Answer: 10

Use AES_ENCRYPT () and AES_DECRYPT ()

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template