Home Backend Development PHP Tutorial Brief description of PHP entry-level interview questions (2)

Brief description of PHP entry-level interview questions (2)

Nov 16, 2017 pm 04:05 PM
php test questions

PHP Junior Interview Questions are for programmers with little experience who are just looking for a job. This provides a lot of help for us to go out for interview, InterviewOfficial meetings often test us, and the interview questions played a big role at this time.

11. Have you ever used version control software? If so, what is the name of the version control software you used?

TortoiseSVN-1.2. 6 svn-1.2.3

12. Have you ever used a template engine? If so, what is the name of the template engine you used?

  • smarty

13. Please briefly describe your most proud development work

...

14. For websites with large traffic, what methods do you use to solve the traffic problem?

  1. First, confirm whether the server hardware is sufficient to support the current traffic

  2. Secondly, optimize database access.

  3. Third, external hotlinking is prohibited.

  4. Fourth, control the download of large files.

  5. Fifth, use different hosts to divert the main traffic

  6. Sixth, use traffic analysis and statistics software.

15. Use PHP to write the code to display the client IP and server IP

function get_client_ip() {#
if(getenv('HTTP_CLIENT_IP')) {
$client_ip = getenv('HTTP_CLIENT_IP');
} elseif(getenv('HTTP_X_FORWARDED_FOR')) {
$client_ip = getenv('HTTP_X_FORWARDED_FOR');
} elseif(getenv('REMOTE_ADDR')) {
$client_ip = getenv('REMOTE_ADDR');
} else {
$client_ip = $HTTP_SERVER_VAR['REMOTE_ADDR'];
}
return $client_ip;
}
Copy after login

16. What is the difference between the statements include and require? To avoid including the same file multiple times, you can use (?) statements to replace them?

  • ##require() Identical in every respect to include() except how it handles failure. include() produces a warning and require() causes a fatal error.

  • In other words, if you want to stop processing the page when the file is missing, use require(). This is not the case with include() and the script will continue to run.

  • require() will include the file anyway, while include() can selectively include.

Use

include_once
require_once
Copy after login
# instead

##17. How to modify the survival time of SESSION

$savePath = "./session_save_dir/";
$lifeTime = 24 * 3600;
session_save_path($savePath);
session_set_cookie_params($lifeTime);
session_start();
Copy after login

18. There is a web page address, such as the homepage of the PHP Development Resource Network: http ://www.phpres.com/index.html, how to get its content?

file_get_contents($url)
Copy after login

19. In HTTP 1.0, the meaning of status code 401 Yes (?); if the prompt "File not found" is returned, the header function can be used, and its statement is (?)##Unauthorized(Unauthorized)

Header("http/1.0 403 Forbidden");
Copy after login
Don’t be anxious after reading the above interview questions. There are other interview questions. It is best to consolidate the basic things to help us interview and find jobs.

Related recommendations:

##php Brief description of junior interview questions (1)

Compilation of PHP junior interview questions

5 common questions among junior PHP developers

The above is the detailed content of Brief description of PHP entry-level interview questions (2). For more information, please follow other related articles on the PHP Chinese website!

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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

CakePHP Date and Time

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

CakePHP Project Configuration

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

CakePHP File upload

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

CakePHP Routing

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

Discuss CakePHP

CakePHP Quick Guide CakePHP Quick Guide Sep 10, 2024 pm 05:27 PM

CakePHP Quick Guide

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

How To Set Up Visual Studio Code (VS Code) for PHP Development

See all articles