随笔分类 - php
摘要:类: 实例化 构造函数__construct() 当初始化实例的时候会被触发 __destruct() 当实例对象被注销的时候,会自动触发 extends 子类继承父类 当子类存在的变量或则构造函数和父类的相同的时候,会覆盖父类的变量和方法 如果需要保留父类的构造函数同时触发的话,可以使用paren
阅读全文
摘要:time() //timestamp getdate() //return a array,contain year,month,day.... and you can pass a timestamp to it,return suitable value format: date(format,
阅读全文
摘要:upload multiple you should add multiple to input element and change name="img[]"; like it: and run it , you will get it: Haha,that is all.
阅读全文
摘要:First: open the php.ini and find the keyword mail function Reference: https://stackoverflow.com/questions/5335273/how to send an email using php Note:
阅读全文
摘要:to use session,you can : delete session have two ways one is other is : if user ban to store cookie in his brower, you can use : you should close cook
阅读全文
摘要:1. r open the file and read only 2.r+ open the file and write 3.w open the file and write only truncates the file to zero length. 4.w+ open the file a
阅读全文
摘要:``` ' . join('|', $known) . ')[/ ]+(?[0-9.|a-zA-Z.]*)#'; if (!preg_match_all($pattern, $u_agent, $matches)) { // we have no matching number just continue ...
阅读全文
摘要:``` "; echo constant('name').''; echo __LINE__.''; //The current line number echo __FILE__.'';//the current filename function abc(){ echo __FUNCTION__.'';//echo function name } abc(); class a{ fu...
阅读全文

浙公网安备 33010602011771号