Selaa lähdekoodia

Fix file write pathing

Lucas de Souza 4 vuotta sitten
vanhempi
commit
18c09768e9
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      app/create_form.php

+ 2 - 2
app/create_form.php

@@ -78,8 +78,8 @@ function saveHTML ($title, $folder,$html) {
     $date = new DateTime();
     $cleanTitle = cleanTitle($title);
     $datePart = $date->format("Y-m-j");
-    $filePath = "$datePart-$cleanTitle-$folder.html";
-    file_put_contents(__DIR__.'/../forms/'.$filePath, $html);
+    $filePath = "$dateart-$cleanTitle-$folder.html";
+    file_put_contents('../forms/'.$filePath, $html);
     return $filePath;
 }