-2

Hello friends i am getting output of this command This code works perfectly

<?php
  echo exec('whoami');
?>

but problem in

<?php
  echo exec('C:\\Users\\user\\Desktop\\abc\\xpdfbin-win-3.04\\bin64>pdfinfo -f 1 test.pdf');
?>

can you please give me your expert advice?

Manwal
  • 23,450
  • 12
  • 63
  • 93
Sam
  • 41
  • 6

1 Answers1

1

using ' for the string will disable escape sequences, so either use " or change each \\ to \

also, this might be related: PHP: Why isn't exec() returning output?

Community
  • 1
  • 1
Mr.Manhattan
  • 5,315
  • 3
  • 22
  • 34