-1

Thats what I've been trying to do for days now, and I can't find a solution.

I have managed to launch the cmd-line OR any given program via php, but I need a program to start within the cmd-line, give it a static command and write the return values into a .txt.

What I want to do

1.The user clicks on a link 2.That executes a php script which automatically: -opens the command line -starts a program within the command line -enters somme commands (e.g process the file, write result to a .txt-file)

It just doesnt work, no matter how I've tried it.

I just don't understand how I should approach the whole thing.

Edit:

Everything is supposed to run on the server! I want to start a biometrics program that compares a picture with another one and return a percentage value.

And I am running windows with xampp.

Monacco Franze
  • 1,541
  • 1
  • 11
  • 12

1 Answers1

0

How do I execute cmd commands through a batch file?

This helped me out a lot. I now have a batch file that does the following:

@echo
c:\
cd C:\Users\XXX\Desktop\OpenBR-0.5.0-win64\bin 
start br -algorithm FaceRecognition -compare C:\Users\XXX\Pictures\1.jpg C:\Users\XXX\Pictures\2.jpg C:\Users\fxw2_000\Desktop\result.csv
pause

Aaaaaaand it works. Awesome!

Community
  • 1
  • 1
Monacco Franze
  • 1,541
  • 1
  • 11
  • 12