tompal18
tompal18

Reputation: 1216

PHP boilerplate code?

I'm new to PHP.

I'm looking for some boilerplate code that that helps me get started on a new project, but not a complete framework. I'm thinking of something like the HTML5 Boilerplate, but for PHP.

I'd expect of such a boilerplate that it has some convenient ways to access a database, string manipulation, autoloading, etc.

Do you know any such PHP Boilerplate?

Upvotes: 2

Views: 4960

Answers (4)

user5838875
user5838875

Reputation:

You could try CodeIgniter, Kohana or FuelPHP.

While they ARE frameworks, they're pretty lightweight and all have the kind of features you're looking for.

Upvotes: 1

Andreas Linden
Andreas Linden

Reputation: 12721

php is a template engine itsself!

don't use other template libraries, they just slow down the processing

example

<persons>
    <? foreach ($persons as $person): ?>
    <person>
        <firstname><?= $person>firstname ?></firstname>
        <lastname><?= $person->lastname ?></lastname>
    </person>
    <? endforeach; ?>
</persons>

mysql

there are several options like ORMs but for a beginner i would recommend to use PDO

Upvotes: 1

ozahorulia
ozahorulia

Reputation: 10084

The best way is to make your own template. I don't think developers will whare with others their templates. But if you don't want waste couple of hours for making a template, you always can use some of PHP frameworks, like Yii, codeigniter, kohana, ZFM, cake, etc. But they are not just a simple templates by the way.

Upvotes: 1

Ren&#233; H&#246;hle
Ren&#233; H&#246;hle

Reputation: 27295

There are some Template Engines like:

Twig
Smarty

when you need a PHP Framework there are some Frameworks. Google them a hint:

Yii
Symfony2
Cake PHP

Upvotes: 1

Related Questions