0
$GET=shell_exec(`/usr/local/bin/ncftpget -R -v -u XXXXX -p XXXXX XX.XX.XX.21 $DESTDIR /CustomsPollerPDF/processed/$pdf_filename`);

im using php to copy file from one server location to another. and i want to log the result/error in $GET variable but im unable to get it. it variable return empty.

kanishka
  • 89
  • 2
  • 9
  • Maybe, it's because the linux copy command doesn't return nothing... – R. García Jul 27 '18 at 06:35
  • Also check if it shell_exec is even enabled on your server, check this answer: https://stackoverflow.com/a/21581873/1526963 – Alexander Wigmore Jul 27 '18 at 06:36
  • 1
    Also the **backticks** already execute the command. Thus leaving `shell_exec()` with the output of said command, if any. Which very likely will not do anything meaningful. – mario Jul 27 '18 at 06:40
  • shell_exec is enabled on my server. is there anyway i can get error result to the variable – kanishka Jul 27 '18 at 06:41

0 Answers0