: This article mainly introduces the second PHP interview. if you are interested in the PHP Tutorial, please refer to it. I went to abuse again in the past two days. after the interview, I felt that I was lost. All right, let's just talk about it.
1. differences between session and cookies.
I don't want to talk about it anymore. baidu.
But let's just put it another way. session_id is generally stored in cookies and transmitted to the server through the header. If cookie is disabled, it can only be transmitted through url.
2. write the following program results.
key = 100; } functionchangeStr($input){$input = '100'; } $input = 0; changeNum($input); echo$input.'
'; $input2['key'] = 0; changeArray($input2); echo$input2['key'].'
';$input3 = new class1();$input3->key = 0; changeObj($input3); echo$input3->key.'
';$input4 = '123'; changeStr($input4); echo$input4;classclass1{}?>
This article mainly describes how to store and reference data types.
3. how to exchange values of a and B without using the third variable.
$a = 1;$b = 2;list($a,$b)=array($b,$a);echo$a.$b;
Another method is to intercept strings, which is not described here.
4. differences between PDO and mysql.
Well, pdo is better than php-mysql. I don't know where I am.
5. display encoding of the specified page in at least two ways
header('content-type:text/html;charset=utf-8');
6. What are the meanings of 200 and 404 returned in the http request header?
200 indicates that the request is successful.
404 indicates that the requested resource does not exist.
For the moment, I can only think of these methods, and I will try again later.
'). AddClass ('pre-numbering '). hide (); $ (this ). addClass ('Has-numbering '). parent (). append ($ numbering); for (I = 1; I <= lines; I ++) {$ numbering. append ($ ('
'). Text (I) ;}; $ numbering. fadeIn (1700) ;}) ;}; script
The above introduces the second PHP interview, including the content, hope to be helpful to friends interested in PHP tutorials.