diff --git a/docs/00_Getting_Started.md b/docs/00_Getting_Started.md index 7f8933e..75c3125 100644 --- a/docs/00_Getting_Started.md +++ b/docs/00_Getting_Started.md @@ -490,6 +490,11 @@ The `web.config` needs an entry for `` under ``: To use clean URLs on IIS 6, you will need to use a custom URL rewrite module, such as [URL Rewriter](http://urlrewriter.net/). +## Known Issues + +- __Windows UTF-8 files support__ Files with UTF-8 characters cannot be handled on windows, this issue has no known fix yet. + + ## Support If you need help using Daux.io, or have found a bug, please create an issue on the GitHub repo. diff --git a/libs/GeneratorHelper.php b/libs/GeneratorHelper.php index a970bc4..9e81e95 100644 --- a/libs/GeneratorHelper.php +++ b/libs/GeneratorHelper.php @@ -59,10 +59,13 @@ class GeneratorHelper $dir = opendir($source); while (false !== ($file = readdir($dir))) { if ($file != '.' && $file != '..') { - if (is_dir($source . '/' . $file)) { - static::copyRecursive($source . '/' . $file, $destination . '/' . $file); + if (is_dir($source . DIRECTORY_SEPARATOR . $file)) { + static::copyRecursive( + $source . DIRECTORY_SEPARATOR . $file, + $destination . DIRECTORY_SEPARATOR . $file + ); } else { - copy($source . '/' . $file, $destination . '/' . $file); + copy($source . DIRECTORY_SEPARATOR . $file, $destination . DIRECTORY_SEPARATOR . $file); } } } diff --git a/libs/Server/Server.php b/libs/Server/Server.php index a0d5b61..18db9ea 100644 --- a/libs/Server/Server.php +++ b/libs/Server/Server.php @@ -71,7 +71,11 @@ class Server $this->daux = $daux; $this->host = $_SERVER['HTTP_HOST']; - $this->base_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']); + + // The path has a special treatment on windows, revert the slashes + $dir = dirname($_SERVER['PHP_SELF']); + $this->base_url = $_SERVER['HTTP_HOST'] . (DIRECTORY_SEPARATOR == "\\"? str_replace($dir,"\\","/") : $dir); + $t = strrpos($this->base_url, '/index.php'); if ($t != false) { $this->base_url = substr($this->base_url, 0, $t); diff --git a/libs/Tree/Builder.php b/libs/Tree/Builder.php index 3735ece..da0ba3d 100644 --- a/libs/Tree/Builder.php +++ b/libs/Tree/Builder.php @@ -98,7 +98,7 @@ class Builder */ protected static function getFilename($file) { - $parts = explode('/', $file); + $parts = explode(DIRECTORY_SEPARATOR, $file); return end($parts); }