Create a framework for a website

Discussion in 'PHP' started by ninom, Mar 13, 2008.

  1. #1
    Hi,

    I try to develop a framework and would like to have an option to include the content dynamically every-time in one single file, which has all the includes and stylesheet and all that stuff.

    How can I do that?

    Or is there a possibility to include the header and footer file in all the files?

    thanks for some inputs :)
     
    ninom, Mar 13, 2008 IP
  2. 00johnny

    00johnny Peon

    Messages:
    149
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Sorry, its kind of a vague description of what you need. Could you clarify
    There are a lot of php frameworks that do all kinds of stuff, so I'm sure you can save yourself some (google php framework) work by finding one and not reinventing the wheel.
     
    00johnny, Mar 13, 2008 IP
  3. ninom

    ninom Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This may be true, but I would like to learn a lot in PHP, not only using a Framework. And I would like to have a Framework which has everything I need, not more, not less..

    Hm, what I tried to say in the first post is, that I would like to create a System to handle websites, which make it easy to integrate between the site, which means, that it should include the right header and the footer everytime I call a file on the server...
     
    ninom, Mar 13, 2008 IP
  4. Gordaen

    Gordaen Peon

    Messages:
    277
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Essentially you need a front controller that determines which content you are looking at. It may be worth taking a look at a framework, even if you don't use it, to see how it does things. I'd recommend CodeIgniter, since it is lightweight but powerful and does what you are describing in a very clear and simple way.
     
    Gordaen, Mar 15, 2008 IP
  5. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #5
    Are you looking for a php framework with DB connectivity? Best suggestion would be to start with one that creates a basic website using only files. After you plow through first setting one up, then design your own framework. Afterwards you can add in database functionality. Best place to start is google code.
     
    shallowink, Mar 15, 2008 IP