摘要: const PI = 3.14; 阅读全文
posted @ 2013-06-12 22:33 helloweworld 阅读(112) 评论(0) 推荐(0) 编辑
摘要: function myFunName($num1, $num2) { $result = $num1 + $num2; return $resultl; } function是关键字。 funs.php中有需要的函数,其他*.php引用funs.php中的函数时,使用 require ‘funs.php’;即可引用。 阅读全文
posted @ 2013-06-12 22:20 helloweworld 阅读(100) 评论(0) 推荐(0) 编辑
摘要: <!—calculate.php—><html><head><title>计算器</title></head><body><form action="result.php" method="post"><table border="1"> <tr><td>第一个数</td><td><input type="text" name="num1&quo 阅读全文
posted @ 2013-06-12 22:01 helloweworld 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 1、基本思想:数据和样式分离。 简单理解:div是存放数据的容器,css是div中的内容如何显示,包括这些内容的位置和外观。 test.html文件 <html><head><title>test</title><!-- 引入css --><link rel="stylesheet" type="text/css" href="my.css"> </link></head> <body><!--... 阅读全文
posted @ 2013-06-12 21:04 helloweworld 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 1、定义一个变量。 定义变量以$开头。 如: $val = 2; 2、变量名区分大小写。 3、基本数据类型。 3.1整型 3.2小数型 不区分单精度 双精度 3.3布尔型 3.4字符串型 4、复合数据类型。 4.1数组 4.2对象 5、特殊数据类型。 null 资源类型 6、定义字符串时,可以用单引号,也可以用双引号。 <?php $v1 = "hello"; $v2 =... 阅读全文
posted @ 2013-06-12 21:03 helloweworld 阅读(125) 评论(0) 推荐(0) 编辑
摘要: (1) <?php//php code?><?php?><h1>php中插入html</h1><?php?>(2)<script laguage=”php”>echo “<br>php测试”;</script> 阅读全文
posted @ 2013-06-12 16:31 helloweworld 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 前提是已经搭建了LAMP环境。 1、安装UCenter. http://www.comsenz.com/downloads/install/ucenter (1)在apache服务器的目录/var/www下新建一文件夹ucenter; (2)下载的UCenter文件中有一个upload文件夹,将upload文件夹中的文件拷贝到/var/www/ucenter中。 (3)浏览器输入http://... 阅读全文
posted @ 2013-06-12 16:06 helloweworld 阅读(269) 评论(0) 推荐(0) 编辑