March 2009 Sina php face questions and Answers (b)

Source: Internet
Author: User

1. Please write out the PHP5 permission control modifier.

Answer: Private protected public.

2. What are the methods you use to solve traffic problems for large-volume websites?

Answer: First, verify that the server hardware is sufficient to support the current traffic.

Second, optimize database access.

Third, prohibit the external hotlinking.

Four, control the download of large files.

Five, using different host to divert the main flow of the six, the use of traffic analysis statistics software.

3. In HTTP 1.0, the meaning of status code 401 is: If you return the prompt "file not found", the header function is available, and its statement is?

Answer: 401 of the meaning is not authorized.

Header ("http/1.0 404 Not Found"); ——— File not found

Header ("http/1.1 403 Forbidden"); ——— do not allow access

4. Install PHP in the Apache module, how to load the PHP module dynamically in the file http.conf, and then use any of the statements so that Apache will all files with PHP extension as php script processing.

Answer: Dynamic loading PHP Module: LoadModule php5_module "C:/php/php5apache2.dll"

All files with PHP extension are processed as PHP scripts: AddType application/x-httpd-php-source. Phps addtype application/x-httpd-php. php. php5. PhP4 . php3. phtml

5. The properties of the class can be serialized and saved to the session so that the entire class can be restored later, which function is used?

Answer: Serialize ()/unserialize ().

6. A parameter of a function cannot be a reference to a variable, unless the module is set to ON in PHP.ini.

Answer: Allow_call_time_pass_reference.

March 2009 Sina php face questions and Answers (b)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.