當前位置:學問君>學習教育>考研>

PHP入門題

學問君 人氣:2.34W

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