News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Michael Kimsal:
Is your code portable to subfolders?
September 02, 2014 @ 09:12:53

In a quick new post to his site Michael Kimsal asks an interesting question that some PHP developers don't think about in the course of their development: "Is your code portable to subfolders?.

Have been dealing with a couple of PHP projects recently which have been a far bigger pain in the backside than I anticipated, and both had some of the same stumbling blocks. In both cases, and in other projects I've seen, there's a huge assumption that the code will be run from the root of a domain, and all url and routing management have this assumption baked in to everything they touch. What's the answer?

Some projects just suggest making a new virtual host in the web server configuration and moving on, but this isn't always a real possibility for some projects. In some recent experience, he's found several of the major PHP frameworks assume this kind of setup. He mentions a Java framework, Spring, that allows for this kind of redirect and wonders why it's not that easy in something like Slim.

Maybe try grabbing your own code sometime and reinstalling it in a 'non-traditional' way, and see how many assumptions you've baked in are really necessary, vs just using defaults.
0 comments voice your opinion now!
subfolder project portable framework

Link: http://michaelkimsal.com/blog/is-your-code-portable-to-subfolders/

blog comments powered by Disqus

Similar Posts

Kris Jordan's Blog: Towards RESTful PHP - 5 Basic Tips

Marius Stanciu-Sergiu's Blog: Which PHP framework I should use

MaltBlue.com: Zend Framework 2 Modules - The Application's Heart

ServerGrove Blog: Easily manage multilingual sites with the new TranslationEditorBundle for Symfony2

Sanisoft Blog: Radio button issues while migrating from cakePHP-1.2alpha app to 1.2prebeta


Community Events

Don't see your event here?
Let us know!


interview series api framework laravel wordpress conference laravel5 extension opinion community release introduction voicesoftheelephpant unittest development podcast middleware language library

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework