PHP frequently interviewed

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

1 question: Please tell me in the simplest language what PHP is? 2 3 Answer: PHP full name: Hypertext preprocessor, is a server scripting language used to develop dynamic Web sites. 4 5 question: What is MVC? 6 7Answer: MVC consists of model (models),View and controller (controllers), PHP MVC can more effectively manage 3 different layers of PHP code. 8 9 Model: Data information access layer. Ten  One The View:view layer is responsible for presenting the applied data in a specific way on the interface.  A  - controller: It is common for controllers to read data from the view, control user input, and send data to the model.  -  the 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 A question: Does PHP support multiple inheritance?  at  - Answer: No, you can't. The PHP class can inherit only one parent class and is identified with the keyword "extended".  -  - 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.  in  - question: What is the difference between the Get and post methods?  to  + 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.  -  the question: What is the way to get the size of an image in PHP?  *  $Reply:getimagesize() Get the size of the picturePanax Notoginseng  - Imagesx () Get the width of the picture the  + Imagesy () Get the height of the picture A  the 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.  $  $ 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 upload is 2MB, but we can also be in PHP.INI file, modify the max_file size option to change.  the  - question: What are the types of errors in PHP? Wuyi  the answer: There are roughly 3 types of errors encountered in PHP.  -  Wu 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.  -  About 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.  -  - question: How do I define Constants in PHP?  A  + Answer: PHP uses define () to define constants.  the  - Define("Newconstant", 30); $  the question: How do I submit a form without using the Submit button?  the  the 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: the  -<a href= "Javascript:document.myform.submit (); >submit me</a>

PHP frequently interviewed

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.