PHP Frameworks

Results 1 to 3 of 3
  1. #1
    Elite Member MattehCarter is offline
    Member +Rank
    Apr 2011 Join Date
    England, UKLocation
    245Posts

    PHP Frameworks

    So, I've been looking around a range of different frameworks, mainly codeigniter. I just have one issue, how the hell do I use them?!

    Do I just rename the framework folder to my project name, then start building my project of the framework?

    So confused >.<

    thanks! :)


  2. #2
    Hm. foxx is offline
    Grand MasterRank
    Sep 2006 Join Date
    Czech RepublicLocation
    5,256Posts

    Re: PHP Frameworks

    Zend Framework: Documentation: Zend Framework & MVC Introduction - Zend Framework Manual

    ---------- Post added at 04:19 PM ---------- Previous post was at 04:18 PM ----------

    walkthrough creating a project in zend

    ---------- Post added at 04:26 PM ---------- Previous post was at 04:19 PM ----------

    after you set it up, it works pretty much like this you create a controller, called, say,

    ArticleController.php

    where all php stuff will be
    <?php

    class ArticleController extends Zend_Controller_Action
    {

    public function viewAction() {
    $someVariable = 5;
    $somethingElse = 1;

    $variable = $someVariable+$somethingElse;

    // pass it to view script
    $this->view->result = $variable;
    }

    }
    then in your view scripts folder you'll make one called "article" with

    view.phtml

    where all html stuff will be
    <div id="page">
    <?php echo $this->result; ?>

    </div>
    and you'll be able to access it with

    http://localhost/article/view

  3. #3
    Elite Member MattehCarter is offline
    Member +Rank
    Apr 2011 Join Date
    England, UKLocation
    245Posts

    Re: PHP Frameworks

    I see, I think I understand it a bit more, I'll have a look at that link. Thanks for the reply! :)



Advertisement