摘要: <?php function getrandomstring($len,$chars=null){ if(is_null($chars)){ $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; } mt 阅读全文
posted @ 2017-03-27 16:54 yahn~ 阅读(2088) 评论(0) 推荐(0)
摘要: <?php abstract class Shape{ abstract protected function get_area(); //和一般方法不同的是,这个方法没有大括号 //不能创建这个抽象类的实例} class rectangle extends Shape{ private $widt 阅读全文
posted @ 2017-03-27 13:06 yahn~ 阅读(419) 评论(0) 推荐(0)
摘要: function getBrowserType(){ $is_mobile = false; $mobile_os_list=array('Google Wireless Transcoder','Windows CE','WindowsCE','Symbian','Android','armv6l 阅读全文
posted @ 2017-03-24 10:00 yahn~ 阅读(1755) 评论(3) 推荐(0)
摘要: header ("content-type:text/html;charset=utf-8"); class A{ function __construct(){ echo "基类的构造方法<br/>"; } } class B extends A{ function __construct(){ 阅读全文
posted @ 2017-03-15 17:25 yahn~ 阅读(241) 评论(0) 推荐(0)
摘要: <?php header("content-type:text/html;charset=utf-8"); class Person extends Animal{ public $PersonSex;//性别 public $PersonAge;//年龄 //继承者的构造函数 function _ 阅读全文
posted @ 2017-03-15 16:31 yahn~ 阅读(338) 评论(0) 推荐(0)
摘要: qq 928546266 阅读全文
posted @ 2017-03-03 15:16 yahn~ 阅读(177) 评论(0) 推荐(0)
摘要: qq.928546266 阅读全文
posted @ 2017-03-02 16:29 yahn~ 阅读(6068) 评论(0) 推荐(0)
摘要: <?php /* 别名和导入可以看做是调用 命名空间的一种快捷方式,php并不 支持导入函数或者常量 */ namespace Blog\Article; class Comment{ function test(){ return 'aaa'; } } //创建一个BBS空间 namespace 阅读全文
posted @ 2017-03-02 14:53 yahn~ 阅读(153) 评论(0) 推荐(0)
摘要: <?php//一个文件里两个命名空间namespace Article;class comment{ function test(){ return 'aaa'; }} namespace MessageBoard;class Comment{ function test(){ return 'ww 阅读全文
posted @ 2017-03-02 13:32 yahn~ 阅读(116) 评论(0) 推荐(0)
摘要: <?php // $html = file_get_contents('http://www.example.com'); $html = file_get_contents('http://blog.csdn.net/yhy5240/article/details/20870403'); $dom 阅读全文
posted @ 2017-03-01 14:38 yahn~ 阅读(380) 评论(0) 推荐(0)