xhui_cool 发表于 2008-12-29 14:28:13

/ 和 \ 的问题

默认的index.php 生成的Bastpath 斜杠和反斜杠混杂在一起啊, 为什么 不统一一下
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);

Hex 发表于 2008-12-29 14:48:12

这个在 linux 上是无所谓的,请记住,PHP 是为 linux 而生的。
在 Windows 一般也不会出问题,但是 PHP 不是为 Windows 而生的,这区别是很大的。

sam 发表于 2008-12-30 08:41:25

hex说话总这么吓人:(

Hex 发表于 2008-12-30 10:01:37

呵呵,实际上就是这么回事,要面对现实。
页: [1]
查看完整版本: / 和 \ 的问题