跪求这10个题答案!凡参与者都有奖!10个都说清楚的至少90分以上……(这诚意明晃晃啊!)大叔大婶come on AV8D! php基础 常见问题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 OCR (Optical Character Recognition,光学字符识别) 第七题dbmopen() ;dbase_open() ;filepro() ;filepro_rowcount() ;filepro_retrieve() ; 1. <?php class Printer { //代理对象,一台打印机 public function printSth() { echo 'I can print <br>'; } // some more function below // ... } class TextShop { //这是一个文印处理店,只文印,卖纸,不照相 private $printer; public function __construct(Printer $printer) { $this->printer = $printer; } public function sellPaper() { //卖纸 echo 'give you some paper <br>'; } public function __call($method, $args) { //将代理对象有的功能交给代理对象处理 if(method_exists($this->printer, $method)) { $this->printer->$method($args); } } } class PhotoShop { //这是一个照相店,只文印,拍照,不卖纸 private $printer; public function __construct(Printer $printer) { $this->printer = $printer; } public function takePhotos() { //照相 echo 'take photos for you <br>'; } public function __call($method, $args) { //将代理对象有的功能交给代理对象处理 if(method_exists($this->printer, $method)) { $this->printer->$method($args); } } } $printer = new Printer(); $textShop = new TextShop($printer); $photoShop = new PhotoShop($printer); $textShop->printSth(); $photoShop->printSth(); ?>2.在可点击的位置上加Google Analytics3.减少数据访问(减少磁盘访问)返回更少数据(减少网络传输或磁盘访问)减少交互次数(减少网络传输)减少服务器CPU开销(减少CPU及内存开销)利用更多资源(增加资源)4.200w太少,随便导。大数据可以分表分批导5.function Person(){ this.name = “Mike”; this.sayGoodbye = function(){"alert(GoodBye!");};}Person.prototype.sayHello = function(){alert(”Hello!”);};function Student(){}Student.prototype = new Person();6.低偶合,高内聚。7.chdir, move_uploaded_file, chgrp, parse_ini_file, chown, rmdir, copy, rename, fopen, require, highlight_file, show_source, include, symlink, link, touch, mkdir, unlink9.$file = "temp.txt"; $fp = fopen($file , 'w'); if(flock($fp , LOCK_EX)){ fwrite($fp , "abc\n"); flock($fp , LOCK_UN); } fclose($fp); 10.echo strtotime('2014-9-23 10:30:25'); 3 优化数据库 建索引4mysqldump 导出10 strtotime() mysql语句配对 $a=new A 和 $a= & new A 到底有没有区别? 一个字符串问题 自己要做网站,如何入手? JS如何在连接后边传的值中带&符号 关于PHP正则问题.... 服务器中的mysql启动正常,但是程序就是不能连接,为什么? 如何求这个数组的最大值。。。最小值, 本人想找一个英语教师! SESSION问题,欢迎高手进来讨论!!有好结果就结帖~~ bbcode解析 [code] 的问题 redis实现点击量浏览量
dbmopen() ;dbase_open() ;filepro() ;filepro_rowcount() ;filepro_retrieve() ;
class Printer { //代理对象,一台打印机
public function printSth() {
echo 'I can print <br>';
}
// some more function below
// ...
}
class TextShop { //这是一个文印处理店,只文印,卖纸,不照相
private $printer;
public function __construct(Printer $printer) {
$this->printer = $printer;
}
public function sellPaper() { //卖纸
echo 'give you some paper <br>';
}
public function __call($method, $args) { //将代理对象有的功能交给代理对象处理
if(method_exists($this->printer, $method)) {
$this->printer->$method($args);
}
}
}
class PhotoShop { //这是一个照相店,只文印,拍照,不卖纸
private $printer;
public function __construct(Printer $printer) {
$this->printer = $printer;
}
public function takePhotos() { //照相
echo 'take photos for you <br>';
}
public function __call($method, $args) { //将代理对象有的功能交给代理对象处理
if(method_exists($this->printer, $method)) {
$this->printer->$method($args);
}
}
}
$printer = new Printer();
$textShop = new TextShop($printer);
$photoShop = new PhotoShop($printer);
$textShop->printSth();
$photoShop->printSth();
?>
2.在可点击的位置上加Google Analytics3.
减少数据访问(减少磁盘访问)
返回更少数据(减少网络传输或磁盘访问)
减少交互次数(减少网络传输)
减少服务器CPU开销(减少CPU及内存开销)
利用更多资源(增加资源)4.200w太少,随便导。大数据可以分表分批导5.function Person(){
this.name = “Mike”;
this.sayGoodbye = function(){"alert(GoodBye!");};
}Person.prototype.sayHello = function(){alert(”Hello!”);};function Student(){}Student.prototype = new Person();
6.低偶合,高内聚。7.chdir, move_uploaded_file, chgrp, parse_ini_file, chown, rmdir, copy, rename, fopen, require, highlight_file, show_source, include, symlink, link, touch, mkdir, unlink9.$file = "temp.txt";
$fp = fopen($file , 'w');
if(flock($fp , LOCK_EX)){
fwrite($fp , "abc\n");
flock($fp , LOCK_UN);
}
fclose($fp);
10.echo strtotime('2014-9-23 10:30:25');
4mysqldump 导出10 strtotime()