~jshsj/rechnungs_generator

6290fa8d474d281846e36b3e06021301675e0244 — JSH 1 year, 10 months ago e590914 master
Added subdirectory for created invoices
1 files changed, 3 insertions(+), 3 deletions(-)

M script.php
M script.php => script.php +3 -3
@@ 114,10 114,10 @@ function handleGenerate($req)

    //$resBody = $res->getBody();
    //file_put_contents("test.pdf", $resBody);
    $fileName = INVOICE_DIR . "Rechnung" . $data["number"] . ".html";
    file_put_contents($fileName, $html);
    $fileName = "Rechnung" . $data["number"] . ".html";
    file_put_contents( INVOICE_DIR . $fileName, $html);

    echo "/" . $fileName;
    echo '/invoices/' . $fileName;

    //$html = $twig->render("template1_print.html", $data);