Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Where Can I find a project structure tutorial?

I'm looking to do a simple project in php, but I need of some "structure" for the project. I wouldn't use laravell or other (I would practicise php), but I need a solid "structure". (It would be a simple cms) (folder for config file, for javascript and css and for template)

thx

3 Answers

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Pietro;

I would recommend looking at some PHP CMS Tutorials online to get an idea of folder structure. There would likely be some similarity between what people post, but naming could be different enough to be confusing. Not everyone would call their CMS Base class file cmsBase.php and locate it an includes file, for example.

If you take a look at some of the tutorials it will allow you to develop your own preferred naming system and folder structure.

A quick Google search brought up the following (I offer no recommendation or opinion on them, however).

Happy coding,

Ken

Ken, Just read this post and wanted to given props for this great answer and comment below. I think too often people tend to dismiss the benefits of trying to build a custom CMS or Social Media site as a method of learning.

thx... because frameworks are good but in my opinion are not good idea for starting learn php. They have their language (as lavarel with blade)

Ken Alger
Ken Alger
Treehouse Teacher

Pietro;

I would definitely recommend working through your own CMS, and then going to a framework after that. It will give you a lot of appreciation for frameworks as a great place to start projects.

Ken

ok! thx.. I'm working. I started from http://www.elated.com/articles/cms-in-an-afternoon-php-mysql/ and now I'm editing some code to add new functions.. thx