• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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, 05:02 AM
Bug in ci/index.php concerning server path? - by El Forum - 03-22-2011, 07:44 AM
Bug in ci/index.php concerning server path? - by El Forum - 03-22-2011, 07:55 AM
Bug in ci/index.php concerning server path? - by El Forum - 03-22-2011, 08:02 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.