0

How can I use javascript in php command line. When I write

<script>documen.Write("Hello World.");</script>

it's printing same things.

Wold
  • 43
  • 5

1 Answers1

1

You have a typo on document.write(), although that won't matter anyway as javascript can only execute in a browser a javascript shell.

Also, it appears you are not the first person to ask this question:

execute js function by php command line

tshimkus
  • 1,173
  • 2
  • 17
  • 24