mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-10-13 16:34:23 -05:00
path problem resolved on windows
This commit is contained in:
@@ -3,8 +3,9 @@ if (!empty($_POST)) {
|
||||
|
||||
// write the d2um.conf file and replace \ with \\
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||
$path = str_replace('\\', '\\', $_POST['path']);
|
||||
$path .= '\\data\\global\\excel\\';
|
||||
$path = rtrim($_POST['path'], "\\");
|
||||
$path = str_replace("\\", "\\\\", $path);
|
||||
$path .= '\\\\data\\\\global\\\\excel\\\\';
|
||||
file_put_contents("../d2um.conf", $path);
|
||||
} else {
|
||||
|
||||
@@ -27,7 +28,7 @@ if (!empty($_POST)) {
|
||||
<p style="font-family: lato">Input path to D2 Mod Directory.</p>
|
||||
|
||||
<div style="margin-top: 20px;">
|
||||
<form enctype="multipart/form-data" style="font-family: Lato; font-size: 11px;" action="" method="post">
|
||||
<form enctype="multipart/form-data" style="font-family: Lato; font-size: 14pt;" action="" method="post">
|
||||
<label for="path">Choose PATH</label>
|
||||
<input id="path" style="width: 420px;" required="required" name="path" type="text">
|
||||
<input type="submit" value="Write Config" name="submit">
|
||||
|
Reference in New Issue
Block a user