i want to print file which contain in $file variable on a local printer. I want a pop up window just like Java Script window.print(). My question is that how i can do the same job using PHP only? here is a solution but it does not show pop up window.
Asked
Active
Viewed 235 times
1 Answers
0
As PHP runs on the host server only, there is no way to interact with the user using a popup window after the page loads as Javascript can. The easiest way would be to have PHP echo the Javascript commands.

Daniel H
- 51
- 1
- 5
-
can you explain it ? – Jamshid Ali May 14 '20 at 02:14
-
This may be helpful - https://stackoverflow.com/questions/11228280/print-txt-file-using-javascript – Daniel H May 15 '20 at 04:19