2012年5月30日

摘要: 1、php可以和html代码混合,但是一定要使用<?php//php代码?>可以在php中嵌入html代码<?phpecho "hello,world";//写另一部分html代码?><h1>hello</h1><?php?>2、还可以使用如下方法嵌入php代码(脚本)<script language="php">echo"<br/>测试一下吧";</script>但是,此方法不推荐。3、如果仅仅为了显示某个变量的值<?=变量?> 阅读全文
posted @ 2012-05-30 08:26 西沙浪花白 阅读(110) 评论(0) 推荐(0) 编辑
 
摘要: create table msg(id int,title varchar(60),name varchar(10),content varchar(1000));#新增一条留言表insert into msg(id,title,name,content)values(1,'初来乍到','张三','新来的');解决字符集问题,默认建表使用的是utf-8,而windows窗口使用的是gbkset names gbk;insert into msg(id,title,name,content)values(1,'又来了','李 阅读全文
posted @ 2012-05-30 08:25 西沙浪花白 阅读(108) 评论(0) 推荐(0) 编辑
 
摘要: 在Apache的安装目录下找到conf下的httpd.conf文件,打开之后查找dir_module,找到如下代码后,<IfModule dir_module> DirectoryIndex index.html</IfModule>在该段代码后添加:#配置虚拟目录<IfModule dir_module> #directory相当于是欢迎页面 DirectoryIndex index.html index.htm index.php #你的站点别名 Alias /MyApache "D:/MyApache" <Directory 阅读全文
posted @ 2012-05-30 08:24 西沙浪花白 阅读(244) 评论(0) 推荐(0) 编辑