當前位置:文思屋>學習教育>考研>

PHP入門題

文思屋 人氣:2.35W

1、用php列印出前一天的時間格式是2006-5-10 22:21:21(2分)

PHP入門題

echo date("Y-m-d G:i:s",strtotime("-1 day"));

2、echo(),print(),print_r()的區別(3分)

echo()是一個php語句,所以沒有返回值,能列印簡單的資料。

print()是一個函式,有返回值,能列印簡單的'資料。

print_r()是一個函式,能列印複雜的(mix)資料。

如:

'wangking','qq'=>'123456');print_r($arr);?>

執行結果:

hello word

the value is 1

Array ( [name] => wangking [qq] => 123456 ) ......

3、能夠使html和php分離開使用的模板(1分)

smarty模板

4、使用哪些工具進行版本控制?(1分)

TortoiseSVN

6、如何實現字串翻轉?(3分)

strrev("Hello world!");

 

TAGS:PHP