PHP中内部函数使用方法
<?php
//获得系统时间函数(注意参数中大写Y代表完整年份,小写y代表年份简写)
$sum = date("Y-m-d");
$sum1 = date("y-m-d");
echo "$sum<br/>";
echo "$sum1<br/>";
//md5加密函数
$pass = md5("张三");
//输出内容为加密后的密文
echo $pass;
?>
相关文档:
<?php
$s = "new string";
//下面双引号字符串中的符号"$"未做转义,因此$s将被替换成其变量的值
$str_1 = "双引号指定的字符串,$s";
//下面双引号字符串中的符号"$"做了转义,因此$s原封不动,不会被替换为变量$s的值
$str_2 = "双引号指定的字符串,\$s";
//单引号字符串中的"$"不用做转义即可原样输出
$str_3 ......
function file_list($path) {
$handle = opendir($path);
if ($handle) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
if (is_dir($path."/".$file)) {
echo "<br /><br /><b> ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</ ......
1: apache服务器安装.apache_2.0.59-win32-x86-no_ssl.msi。
修改conf\httpd.conf中的文件,修改位置为:
DocumentRoot "c:/webpage" 设置虚拟目录 c:/webpage.
DirectoryIndex index.html index.html.var index.php
==使apache服务器识别php的扩展名。
在<Directory "c:/pr ......