Tom: mit ajax "onclick" batdatei ausführen

Beitrag lesen

Hello,

»» Jetzt poste doch endlich mal diese dämliche Batchdatei.

type rechnung1.txt > lpt2

Na sowas auch ;)

Geht bestimmt auch ohne Batch:

Habe ich ihm auch schon mal gepostet!

<?php     ###line_printer.php ###

siehe auch http://de3.php.net/manual/en/book.printer.php

$fh = fopen('LPT1','w');
fwrite($fh, 'Hallo ist ist der neue Text'.chr(12));
fclose($fh);

?>

Außerdem würde ich nicht 'type' nehmen, sondern 'copy'
'Type' lässt sich nicht auf allen Installationen umleiten.
Und 'LPT2' würde ich auch immer groß schreiben, weil es sonst manchmal nicht als Kanal erkannt wird, sondern stattdessen eine neue Datei geöffnet wird.
Woran das liegt, weiß ich nicht.

Liebe Grüße aus Syburg

Tom vom Berg

--
Nur selber lernen macht schlau
http://bergpost.annerschbarrich.de