Welcome Guest, Not a member yet? Register   Sign In
Bug in ci/index.php concerning server path?
#1

[eluser]Unknown[/eluser]
I've had some issues with backslashes appearing in my $system_folder (BASEPATH).
I'm developing on Windows XP using WAMPSERVER 2.0, and Codeigniter 1.7.2.

I've set system folder as indicated by the manual:
$system_folder = "system";

Then..

Code:
<?php echo BASEPATH; ?>

Gives me the following result:

Code:
C:\wamp\www\ci/system

To solve this I added the "swap directory seperator to unix style" into line 68 in ci/index.php:

Code:
if (strpos($system_folder, '/') === FALSE)
{
    if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
    {
        $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
            // Swap directory separators to Unix style for consistency
            $system_folder = str_replace("\\", "/", $system_folder);
    }
}

BASEPATH now gives me the expected result:

Code:
C:/wamp/www/ci/system/

Is this a bug?


Messages In This Thread
Bug in ci/index.php concerning server path? - by El Forum - 03-22-2011, 04:02 AM
Bug in ci/index.php concerning server path? - by El Forum - 03-22-2011, 06:44 AM
Bug in ci/index.php concerning server path? - by El Forum - 03-22-2011, 06:55 AM
Bug in ci/index.php concerning server path? - by El Forum - 03-22-2011, 07:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB