Just another web 3.0 blog :: prev - next

--- Annecy vue aérienne Albigny ---

--- Css sprites dynamic updates ---

Replaces the previous 2007 version, faster, accurate, easy to change + spritesgenerator ( don't miss the run button ) :

--- phpoo++ notfound classes ---

#-notfound.class.php class notfound{ public $data=[];#fs, mais individuelles #appels functions not set function __call($name,$args){ #die("__CALL:".$name.":".print_r(compact('args'),1)); $name=strtolower($name); if(array_key_exists($name,$this->data))return $this->data[$name];#obj->name(); #failsafe for _ method differences $name=strtolower(str_replace('_','',$name)); $matches=[$name,'get'.$name,'set'.$name]; foreach($matches as $method) if(method_exists($this,$method))return $this->$method($args); #aliases $aliases=['gettitre'=>'getnom']; foreach($aliases as $souhait=>$exists) if($name==$souhait && method_exists($this,$exists))return $this->$exists($args); #getters, setters not found $reste=substr($name,3); if(substr($name,0,3)=='get')return $this->$reste; if(substr($name,0,3)=='set')$this->$reste=reset($args); #global namespaces functions if(in_array($name,['ajoutsessionpubaffiliation','create_centre_fiches_offre_fiche']))return; if(function_exists($name))return call_user_func(''.$name,$args[0]); #$f=__FILE__.':'.__LINE__;die('
'.print_r(compact('f','name','args'),1));              
        return $this;#anyways
    }
    /*private function __construct(){}*/
    function __construct($p=[]){
        if(is_array($p))foreach($p as $k=>$v)$this->$k=$v;#register those parameters if passed
        #$class=static::class;if(!isset(static::$instances[$class]))static::$instances[$class]=$this;else static::$additional[$class][]=$this;
    }#register him anyways, la seconde construction ne sera pas bindée..
}

#-autoloader.php

spl_autoload_register('load1');
function load1($classname) {/*__autoload*/
  static $loaded;if(is_array($loaded)&& in_array($classname,$loaded))return;
  $f = "./". $classname .".php";
  if(is_file($f)){require_once($f);}#but the globals remains nested here forever ..
  else{
      require_once'notfound.class.php';
      eval("class {$classname} extends notfound{};");#;echo',nf:'.$classname;
      #file_put_contents('/home/500.clog',"
".date('YmdHis').':'.__FILE__.__LINE__.':'.$classname,FILE_APPEND);
  }
  $loaded[]=$classname;
}

--- PCRE php regex ---

PCRE php regex

--- Any brighter day yet ---

.. I has been a while .. a real long time since I haven't expressed in written thought in English, perhaps I would feel ashamed of my poor vocabulary or whatever some people say .. 2014 - 2015 have really been shitty years, like being throught a 600 days ++ storm .. No here it is : PHP7-FPM, brand new server, no more errors, all projects cleared, looks like a brand new shinny road ahead .. might be naive, as I'm expecting lots of good things to come for 2016

--- Back office developer Annecy ---

Développement de sites internets, back office, symfony sur Annecy : Back office developer Annecy#

--- webcam annecy haute savoie ---

Quelle météo fait -il en station ? http://a74.fr/z/webcam.php

--- mobius cam fpv oven solder ---

Mobius cam fpv oven trick : http://www.rcgroups.com/forums/showthread.php?t=1904559&page=968 Crashed mobius could lead to weird electronics behaviour due to "cracked" soldering, putting it 5 min @ 190° in the oven might "repair" those connections, as well as "fully compromise the whole electronics". Procedure known as motherboard reflow.

--- php 200 ok blank page bug ---

php 200 ok blank page bug : check for short array syntax (php5.4+) within your code, or place die(__FILE__.__LINE__) until you've found the file & line responsible for this

--- Website checklist ---

1) Has backups ( source, sql, medias, static files ) ? 2) Version Control ? 3) Portable ? Minimum dependencies ? Easy To Migrate settings ? 4) Mysql crash proof ? 5) Redis crash proof ? 6) Has a failsafe ? Failover ? 7) Has a developer logs && maintenance logs 8) Optimized queries, cache, 304, cdn 9) Elastic Ip adress or short TTL domain name ( in case main server has no failover and needs to be switched .. ) chown 33:33 -R .;#www-data ( apache or nginx user ) find . -type d -exec chmod 775 {} ; find . -type f -exec chmod 644 {} ; - Avoids spending 70% time switching files && environments - Avoids spending 25% time with phpmyadmin in prod environment - Avoids spending 15% time reviewing log files Using Frontcontroller : assume .php files can't be accessed directly by their respective urls ( frontcontroller defines FRONTCONTROLLER ), if(!defined('FRONTCONTROLLER'))die; Frontcontroller for 404 : send 200 headers if ressource matches a route

D�veloppeur php Gen�ve - php - rando - trip - india - web - php - dev - eco - science - astro - shop - annecy


0