0

I am just starting to build an Android app using Tesseract to detect the text. My idea is to put the image process part to a server built on PHP. But to start Tesseract on my Windows laptop, it needs CMD. I am not a web developer and am new with PHP; as far as I have searched on the internet, PHP cant do this kind of task. But is there any way around?

This is not a duplicate, it is not about how to access PHP from CMD, please read carefully before flagging as a duplicate.

Nick
  • 138,499
  • 22
  • 57
  • 95
  • 1
    Possible duplicate of [How to access PHP with the Command Line on Windows?](https://stackoverflow.com/questions/7307548/how-to-access-php-with-the-command-line-on-windows) – Sanguinary Oct 16 '18 at 09:03
  • Which command you want to execute from PHP? – PrakashG Oct 16 '18 at 10:33
  • i just need to do something like this: tesseract test_image.png output it mean to create a txt file contain the text in the input image – Euphoria Celestial Oct 16 '18 at 10:49

1 Answers1

2

You can execute any Windows Command from PHP like this:

$output = shell_exec("getmac"); 

Instead of getmac you can put any valid windows command which can be executed from Command-line.

PrakashG
  • 1,642
  • 5
  • 20
  • 30