How to run msgfmt using exec in php?

384 Views Asked by At

I am trying to use exec command in PHP as follows:

exec("msgfmt /locale/2019_11_26_17.po -o /locale/file.mo")

It is not allowing me to do it. However, if I run this command using terminal, it works.

Please help me to figure out what is going wrong?

Thank you, Trupti

1

There are 1 best solutions below

0
On

Try that:

exec("msgfmt /locale/2019_11_26_17.po -o /locale/file.mo");

" <- is important for function.