Simple Php Framework

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Simple Php Framework

    Hi. I will show you a simple php5 framework with learning purpose. If you'll interest about the application i'll explain more about it in the next posts.
    //An example with few explanations ...
    PHP Code:
    <?php
       define
    ('FRAME_WORK_PERMISION',1); 
       require(
    'icefwlib/Engine_Class.php');
         
       
    $fw = new IceFrameWork;
       
       
    #aaa with $fw->Turn_On_Security(ALL); you can start the protection for your variabiles... // i will update it soon
       
    $cont 'This is a site using IceFrameWork.<br/> Yes it\'s sounds stupid....';
       
      
    $arr = array('TITLE'=>'Just a test.'
                   'CONTENT'
    =>$cont
      
    );
      
    //        OR        
      // $fw->assign_single('CONTENT',$cont);
    // OR for wml  
    // $fw->assign('Wml PAGE');
     // $fw->title = 'wml title';
    // OR
      // see in /icefwlib/tpl/main.tpl more about this key words.
      
      
    $fw->GetTemplate('main',$arr,'html');
      
    // PS: in tpl folder you will make a tpl for your html
      // for a foo.tpl you must have the resurse_foo folder where you put the css and graphix....
      //            OR 
      /*
      $html_code = '<head><title></title>
      <body>blah blah</body></html';
      $fw->assign($html_code,'html');
      */
      //  if cache_on == true the fw will cache your wml / html page
      //
      # $fw->cache_on = TRUE;
      # $fw->SetCache(IP); // IP = cache for user by ip || URL = foar all users cache the page
      # $fw->CacheLife = 2*60*60; // in seconds
      
      
      
    $fw->Compile_Page(); // after all codes
     
    ?>
    Soon i'll make a documentation for this noobish framework.
    PS: It has from default the i18n multi-languages by CreativityKills active...
    PS2: Yes isnt like kohana , codeigniter fw...... it's only for beginners-advanced beginners in php
    Attached Files
    Last edited by i0nutzxp; 23.05.11, 14:56.
    <?php unlink('World/Europe/Romania.country'); ?>

    #2
    nice to see my multilang script in use

    Comment

    Working...
    X