2013年7月5日
摘要:
先来写一下HTML上传文件的代码: Send this file: 多次运行发现代码错误: 没有这个文件或路径?好吧 修改代码: 好了 实现上传了.
阅读全文
posted @ 2013-07-05 21:11
Linuxroot
阅读(253)
推荐(0)
2013年7月4日
摘要:
七月: 继续学习PHP;八月-十一月: javascript; JQuery;十二月: 写一个基于模块化的博客;
阅读全文
posted @ 2013-07-04 20:31
Linuxroot
阅读(131)
推荐(0)
2013年7月1日
摘要:
1 // 这里用数字来作为索引 2 $myArray = array(2012, 'blue', 5, 'BMW'); 3 4 // 这个用关键字作为索引 5 $myAssocArray = array('year' => 2012, 6 'colour' => 'blue', 7 'doors' => 5, 8 'make' => 'BMW'); 9 10 ...
阅读全文
posted @ 2013-07-01 21:26
Linuxroot
阅读(190)
推荐(0)
摘要:
一些内建方法: 1 class Person { 2 public $isAlive = true; 3 4 function __construct($name) { 5 //这里我们创建了一个name的属性 6 $this->name = $name; 7 } 8 //dance方法 返回一个值 9 public function dance() {10 return "I...
阅读全文
posted @ 2013-07-01 21:10
Linuxroot
阅读(165)
推荐(0)
摘要:
面向对象——类: 创建一个类: 1 //创建了一个没有内容的Person(人)类2 class Person{3 4 }5 //通过new关键字来 实例化一个类 6 $teacher = new Person; //teacher属于Person类7 $student = new Person; //学生也是人的种类 类的属性: 1 //类的属性相当于我们平常在PHP中说的变量 2 class Person{ 3 public $isAlive = true; 4 public $firstName; 5 public $lastName; 6 pub...
阅读全文
posted @ 2013-07-01 20:44
Linuxroot
阅读(211)
推荐(0)
摘要:
自定义函数: 1 $name = "fakeface"; 2 function dispalyName(){ 3 echo "fakeface"; 4 } 5 6 function returnValue(){ 7 return "fakeface";//返回一个值 8 } 9 10 function takesParameter($name){11 echo $name; //输出名字12 }13 14 dispalyName();//函数调用15 returnValue();16 takesParameter($name);
阅读全文
posted @ 2013-07-01 19:55
Linuxroot
阅读(100)
推荐(0)
2013年6月30日
摘要:
字符串函数: 1 $name = "fakeface";2 $myname =substr($name,0,3);//输出前面三个字符 fak3 print $myname;4 $name = strtoupper($name); //小写5 print $name;6 $name = strtolower($name);、、大写7 print $name;8 $position = strpos($name,"c");//输出c的位置9 print $position;View Code 数学函数: 1 $n...
阅读全文
posted @ 2013-06-30 13:35
Linuxroot
阅读(348)
推荐(0)
2013年6月6日
摘要:
CREATE TABLE articles( id smallint unsigned NOT NULL auto_increment, publicationDate date NOT NULL, # When the article was published title varchar(255) NOT NULL, # Full title of the article content mediumtext NOT NULL, # The HTML content of the article PRIMARY KEY (id));
阅读全文
posted @ 2013-06-06 16:13
Linuxroot
阅读(107)
推荐(0)
2013年6月5日
摘要:
.用于类 #用于IDDIV:border-radius:5px;font-weight: bold;P:display: inline;position: relative;margin-left: 138px;pseudo-class selector <a></a>a:hover {color: #cc0000;font-weight: bold;text-decoration: none;}a:link: An unvisited link.a:visited: A visited link.a:hover: A link you're hovering
阅读全文
posted @ 2013-06-05 18:06
Linuxroot
阅读(113)
推荐(0)
摘要:
1 //创建四个DIV 分别有宽,高,背景颜色 2 <div style="width:50px; height:50px; background-color:red"></div> 3 4 <div style="width:50px; height:50px; background-color:blue"></div> 5 6 <div style="width:50px; height:50px; background-color:green"></div>
阅读全文
posted @ 2013-06-05 16:42
Linuxroot
阅读(168)
推荐(0)