Simple Php Framework

Started on the old forum in May 2011 · view the original in the archive · old links redirect here

1 reply · 395 views · started 15 years ago · 1 min read

2 participants
i0nutzxp Developer · 150 posts #1

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
   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

<?php unlink('World/Europe/Romania.country'); ?>
Attachments: framework.rar

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close