Activity Stream
48,167 MEMBERS
61036 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1.     
    #1
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com

    Default New PHP Framework! - Create applications on the fly!

    Heya guys,

    Recently im been building a framework system that will help you start your own scripts / applications easy and speed with a framework!

    what this will allow you to do is build 1 file with no includes what so ever and have everything set up for you!!

    The framework will come with the following

    • Config
    • Smarty Template Engine
    • Session Handlers (File / Database)
    • Input Sanitizer
    • Output system
    • Database (mysql / mssql / mysqli)
    • Module system
      • Simple Curl
      • Easy emailer (with attachments)
      • Json encoder/Decoder
      • Lots more to be developed


    All applications have a custom directory meaning you can build several different applications within the same framework!

    It only takes a few minutes to start building an application! heres the steps that you take to get a hello world application

    in index.php or whatever file you want to run the hello world application add these lines
    PHP Code: 

    <?php
    //Define root base for security
    define('BASE_PATH',str_replace("\\","/",dirname(__FILE__)));

    include 
    BASE_PATH '/system/Startup.php';

    //Load the hello world application
    Registry::get('Application')->load('hello_world');
    ?>
    In system/applications create a folder with the same name as the above line witch ion out case is hello_world

    system/applications/hello_world/

    Inside this folder create a new file called load.php this file will be executed system automatically!

    Ok so lets now create the template side of it

    In styles/ create a new folder witch for all the template files related to your hello_world application so in our case create a folder called hello_world

    Ok now each application requires 3 folders inside



    *Compile is where the system compiles all templates
    config holds smarty config files if you wish to use them
    *Plugins is for smarty plugins percific to your template (plugins for smarty in here will be added to the plugin system)

    ok so new create a new template file called index.tpl and add the following code
    Code: 
    Hello World
    Sweat! now just 1 more file!

    create a new file called load.php and save as system/applications/hello_world/load.php

    Inside the load.php add the following lines

    PHP Code: 
    <?php
    if(!defined('BASE_PATH')){exit;}

    /*Tell the system what template were using*/
    applicationSetTemplateFolder('hello_world');

    /*parse the tempalate and return it*/
    $html Registry::get('Template')->fetch('index.tpl');

    /*Send the html to the browser with compression and everything done for you*/
    Registry::get('Output')->send($html);
    ?>
    As simple as that you can create a hello_world application!

    Just a layout if the Registry object

    Registry::get('Template')->fetch('index.tpl')

    This holds all the main framework system data

    This fetches a sub object such as Tempalte / Modules / Output / Input

    This holds teh method of the object you jsut fetched so if we fetched Input then we cauld use get('id','get',false) and this would return a sanitized $_GET['id'] and return false if not set

    This is the param area where you send the method certain parameters

    In the applications you can even do for simplicity perposes

    PHP Code: 
    $Input Registry::get('Input');
    $Output Registry::get('Output');
    $Session Registry::get('Session');
    $Database Registry::get('Database');
    $Module Registry::get('Module');
    $Template Registry::get('Template'); 
    And these are just some of the features the framework has!
    \
    Ok so if you wish to download it and have a little play its available at
    http://litewarez.net/framework.rar

    This is unreleased and i would really appreciate any comments ideas and down sides! im all ears.
    litewarez Reviewed by litewarez on . New PHP Framework! - Create applications on the fly! Heya guys, Recently im been building a framework system that will help you start your own scripts / applications easy and speed with a framework! what this will allow you to do is build 1 file with no includes what so ever and have everything set up for you!! The framework will come with the following Config Rating: 5
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  2.   Sponsored Links

  3.     
    #2
    Member
    will try this ..
    thanks for releasing !
    Coding Horror Fan
    I don't read PM's frequently .

  4.     
    #3
    Member
    got these errors for the app that you have included ( heloo world )
    Code: 
    Warning:  file_get_contents(/var/lib/php5/sess_c59374426661011b78353acf59c1729d) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/nginx-default/system/engine/session_drivers/file.php on line 21
    Code: 
    
    Warning:  session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /var/www/nginx-default/system/engine/session_drivers/file.php:21) in /var/www/nginx-default/system/engine/Session.php on line 52
    Code: 
    Warning:  session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/nginx-default/system/engine/session_drivers/file.php:21) in /var/www/nginx-default/system/engine/Session.php on line 52
    Wello World
    Coding Horror Fan
    I don't read PM's frequently .

  5.     
    #4
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    Please update the file a minor bug

    find on line 20 of system/engine/session_drivers/file.php

    PHP Code: 
    public function read($id)
    {
        
    $sess_file $this->save_path "/sess_" $id;
        return (string) 
    file_get_contents($sess_file);

    with

    PHP Code: 
    public function read($id)
    {
        
    $sess_file $this->save_path "/sess_" $id;
        if(
    file_exists($sess_file) && is_readable($sess_file))
        {
            return (string) 
    file_get_contents($sess_file);
        }
        return 
    false;

    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  6.     
    #5
    Member
    Website's:
    SceneRLS.org
    Sounds interesting, I'll have a look at this, thanks.


  7.     
    #6
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    be sure to leave feedback and bug reports
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  8.     
    #7
    Member
    thanks for the quick fix..
    I will surely try to create a small app from this framework..
    other frame works like Cphp, CI are complicated .your framework ( Name ?) is very easy to use and n00b friendly
    and I the curl module
    Coding Horror Fan
    I don't read PM's frequently .

  9.     
    #8
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    yea this you just build you app in the applications folder and use Registry to grab the stuff you need!

    i tried to make it as simple as possible and if users like it ill create a domain and release with full api and bog tuts etc!

    i havent thought of a name atm but if anyone has ideas then be sure to ask me and if i like it then ill use it!
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  10.     
    #9
    Member
    syntax error in

    PHP Code: 

    /*parse the tempalate and return it*/ 
    $html Registry::get('Template')->fetch('index.tpl'
    and for others who are trying, don't forget to chmod 777 the compile directory.
    Coding Horror Fan
    I don't read PM's frequently .

  11.     
    #10
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    add the ; << to the end of the line to tell php that that command has ended!
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. RAD Framework
    By SplitIce in forum Web Development Area
    Replies: 40
    Last Post: 5th Oct 2012, 05:29 PM
  2. 45 applications in 1
    By Jawus in forum Useful Sites
    Replies: 0
    Last Post: 30th Jul 2012, 05:17 PM
  3. How To Keep Those Applications Installed?
    By mani in forum Technical Help Desk Support
    Replies: 6
    Last Post: 2nd Sep 2010, 09:38 PM
  4. Essential applications
    By CM in forum General Discussion
    Replies: 13
    Last Post: 20th Aug 2010, 12:53 PM
  5. Run .net framework app without it
    By pankaj in forum Web Development Area
    Replies: 12
    Last Post: 11th Jul 2010, 12:27 PM

Tags for this Thread

BE SOCIAL