PHP programmer must be clear about the problem Rollup _php tutorial

Source: Internet
Author: User
Tags pear php and mysql what php

PHP programmers must have a clear summary of issues


Are you looking for a PHP development job, and are you looking for some questions and answers about PHP? This article shares some of the 11 most frequently asked PHP interview questions, as well as the corresponding regular answers, each company has its own interview criteria, interviews and questions are entirely dependent on your role in the work, of course, and your programming skills are closely related.

1. Question: Please tell me in the simplest language what PHP is?
Answer: PHP full name: Hypertext preprocessor, is a server scripting language used to develop dynamic Web sites.

2. Question: What is MVC?
Answer: MVC consists of model, view, and controller, and PHP MVC can manage 3 different layers of PHP code more effectively.

Model: Data information access layer.

The View:view layer is responsible for presenting the applied data in a specific way on the interface.

Controller: It is common for controllers to read data from the view, control user input, and send data to the model.

3. Question: Are there several ways to reference CSS in a page?
Answer: There are 3 ways to use CSS in the page:

referencing external CSS files
Internally defined style style
inline style

4. Question: Does PHP support multiple inheritance?
Answer: No, you can't. The PHP class can inherit only one parent class and is identified with the keyword "extended".

5. Question: What is the difference between echo and print in PHP?
These two look very similar, because they all print some values on the screen. But the essential difference between echo and print is that echo is used to output strings, which can be separated by commas when displaying multiple values. Only basic types are supported, and print can print not only string values, but also the return values of the functions.

6. Question: What is the difference between the Get and post methods?
Answer: The form information that we fill out on the webpage can pass the data to the server through these two methods, when we use Get method is, all information will appear in the URL address, and use Get method can only pass 1024 characters, Therefore, you can use the Get method if the transfer volume is small or the security is less important. When it comes to the post method, you can transfer up to 2MB bytes of data and adjust it as needed.

7. Question: What is the way to get the size of an image in PHP?
Answer: getimagesize () Get the size of the picture

Imagesx () Get the width of the picture

Imagesy () Get the height of the picture

8. Question: What is pear in PHP?
Answer: Pear is the PHP extension and application Library (PHP Extension and Application Repository), which is a code repository for PHP extensions and applications.

9. Question: How do I upload videos in PHP and MySQL?
Answer: We can store the address of the video in the database without having to have the real video data in the database. The video data can be stored in the server's specified folder, the default size of the upload is 2MB, but we can also modify the max_file size option in the php.ini file to change.

10. Question: What are the types of errors in PHP?
Answer: There are roughly 3 types of errors encountered in PHP.

Tip: It's all very normal information, not a big mistake, and some won't even show it to the user. For example, access to non-existent variables.

Warning: This is a bit of a serious error that will present the warning message to the user, but will not affect the output of the code, such as containing some files that do not exist.

Error: This is a real serious error, such as accessing a nonexistent PHP class.

11. Question: How do I define Constants in PHP?
Answer: PHP uses define () to define constants.

Define ("Newconstant", 30);

Question: How do I submit a form without using the Submit button?
If we do not want to submit the form with the Submit button, we can also use hyperlinks to submit, we can write the code:

Submit Me

The above 11 is the most basic PHP common sense, here to record, but also for the new entry of the Phper reference

http://www.bkjia.com/PHPjc/930079.html www.bkjia.com true http://www.bkjia.com/PHPjc/930079.html techarticle PHP Programmers must be clear about the issues you are looking for in a PHP development work, and also looking for some questions and answers about PHP? This article is for you to share some of the ...

  • Related Article

    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.