I am trying to print php generated page using [2Printer](https://www.doc2prn.com/syntax)(Free Version) from [fcoder.zendesk.com](http://fcoder.zendesk.com). I used the following codes to do the task:

```
<?php
exec("2Printer.exe -s 'text.php' -alert_no");
//shell_exec("2Printer.exe -s 'text.php' -alert_no");
//system("2Printer.exe -s 'text.php' -alert_no");

```

None of the above codes work and does not output any errors as well. I tried it with a text file (.txt), still it is not working. But from the normal command window (cmd), the printing is working. Is there anyone having experience with 2printer, please help.