Welcome Guest, Not a member yet? Register   Sign In
PyroCMS v0.9.7.4 - an open-source modular general purpose CMS
#30

[eluser]Phil Sturgeon[/eluser]
You are right, it is a little confusing. It's a personal choice of mine to put all the app in the web root, then have CI sitting one up from there. Think I should rename the appdir to application or pyrocms?

Edit: Got a potential fix for asset helper. To find the relative root path this crazy bit of code should do it.

Code:
$relative_appdir = isset($_SERVER['DOCUMENT_ROOT'])
    ? str_replace( str_replace("\\", "/", $_SERVER['DOCUMENT_ROOT']) , '', str_replace("\\", "/", realpath(APPPATH)) )
    : '';

echo $asset_dir = $relative_appdir .'/assets/';

Could someone check my logic there? It seems about right, on a default CI install that code gave me:

Quote:/codeigniter/application/assets/

I basically want to avoid using base_url() as this means you have to create a HTTP connection for each and every file you include, that would be no good for speed at all.


Messages In This Thread
PyroCMS v0.9.7.4 - an open-source modular general purpose CMS - by El Forum - 04-09-2009, 05:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB