PHP face questions are as follows:
Copy the Code code as follows:
$a = 1;$x =& $a;$b = $a + +;?>
Ask:
What are the values of $b and $x?
The answers to the PHP interview questions are as follows:
$b = 1;
$x = 2;
Do you understand? Don't
What do you mean by submit?
The Submit object represents one of the submit buttons in the HTML form (the Submit button).
This article is to explain that PHP receives the submission form when judging if ($_post[submit]) and if (Isset
Curl Libraries in PHP (Client URL library function)
curl_close-closing a Curl session
curl_copy_handle-Copy all the contents and parameters of a Curl connection resource
curl_errno-returns a numeric number that contains the current session error
Integer can have 10 binary, 8 binary, 16 binary representation.
In octal notation, the number needs to start at 0 (0);
In hexadecimal notation, the number needs to be 0x (0 x) or 0X (0 caps X) to begin with;
Integer overflow: When an integer
such as paging, because some links already have parameters, in the additional paging information can not discard the original parameters, so determine whether the link has parameters, and then attach paging information as needed.
The method is
Template file template.htm:
Copy the Code code as follows:
%title%
%title%
%body%
PHP Files:
Copy the Code code as follows:
The Replace function is used to replace the keywords in the content read from the template file with the
Mysql_set_charset ().
This function is used in this way:
Mysql_set_charset (' UTF8 ', $link);
The success returns TRUE, and the failure returns FALSE.
It's so simple.
Here is the original PHP manual
This is the preferred the charset. Using
Although PHP is a powerful tool for building WEB systems, the functionality of PHP Access databases has not been standardized, and each database uses a different and incompatible application interface (API). In order to fill this shortcoming, there
1, form section:
Copy the Code code as follows:
my is Upfile app!!
2, Process the form page:
Copy the Code code as follows:
$mkdir _file_dir = mkdir ('./img/'. $_post[' title '],0777); Get to the title, create a folder underneath the
1. Object-oriented concepts
Object-oriented programming (object oriented Programming,oop, OOP) is a computer programming architecture, and one of the basic principles of OOP is that a computer program is composed of a single unit or object that can
How to use:
Memcached
Copy the Code code as follows:
$cache = new Cache_memcache ();$cache->addserver (' www1 ');$cache->addserver (' www2 ', 11211,20); This server has double the memory, and gets double the weight$cache->addserver (' www3 ', 11211)
In the PHP script to read Chinese or other language is garbled, first check that your file format is stored in UTF8 encoding format. If not please use ultraedit ... And so on some of the tools to convert UTF8 support conversion, it is best not to
However, there is generally no coding problem in English, only the Chinese data will have this problem. For example, when you write a program with Zend Studio or editplus, using GBK encoding, if the data needs to enter the database, and the database
Here's how to use it:
Enter the following code at the top of the page where you want to use the form feature:
Jhtml::_ (' behavior.formvalidation ');
Then add the following script to the page
Copy the Code code as follows:
Modify the code at
Easy to use method:
Copy the Code code as follows:
$object = new Httpdownload ();$object->set_byfile ($file)%n#h#%;//server file name, including path$object->filename = $filename;//download Save as file name$object->download ();
3. Source
When compiling PHP, if there is no special need, it is forbidden to compile PHP parsing support to generate CLI command-line mode. –DISABLE-CLI can be used at compile time. Once you compile PHP that generates CLI mode, you may be exploited by
This time in reading "PHP and MySQL Web development" a book to see Str_replace explanation, a little hint to write: can be used in the array of Str_replace three, but the explanation is relatively simple, so decided to experiment with the function
Can be preceded by the error statement plus @
You can also modify php.ini
Php. INI error_reporting = E_all caused, if you do not want to see this hint, you can
error_reporting = E_all &~e_notice.
You can also add error_reporting (0) to the top of
Copy the Code code as follows:
$a = 1;Include ' B.inc ';?>
Here the variable $a will take effect in the include file B.inc. However, in a user-defined function, a local function scope is introduced. Any variables that are used inside the
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