Welcome Guest, Not a member yet? Register   Sign In
application_folder var set in doc root index.php
#1

[eluser]besson3c[/eluser]
Hello,

My explaining why this is a problem for me is probably going to confuse most and distract from my point here, but the cliff notes of this is that I'm loading all of CodeIgniter via a PHP include statement of the index.php in the document root out of necessity based on how I'm handling some AJAX calls, and this is working in CI 2, but only after the following adjustment in the index.php file:


$application_folder = 'application';
// convert to absolute path
$application_folder = realpath($application_folder).'/';


This is handled in the same style as system_folder, I'm not sure whether omitting this for application_folder was a design decision or an oversight, but setting this accordingly has been a necessary patch for me.

Also, commenting out the following in the same file has been the second change necessary for me:

//if (defined('STDIN'))
//{
chdir(dirname(__FILE__));
//}


i.e. I want the chdir to run regardless.


I'm wondering what the harm is in my changes just being a part of the CI codebase? Would they break anything? I can definitely live with these two patches of my own, but I'm just wondering Smile




Theme © iAndrew 2016 - Forum software by © MyBB