Browse Source

Fix file write pathing

Lucas de Souza 3 years ago
parent
commit
18c09768e9
1 changed files with 2 additions and 2 deletions
  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;
 }