0

I am executing blow command through my php file but getting an error. Please guide me what I am doing wrong.

exec('/var/www/sizeme/demo/imaguRunner /var/www/sizeme/demo/example/
parameters.txt',$output,$return_val);

Error
-----------------
Array ( [0] => FATAL: Could not open input parameters file "/var/www/sizeme/demo/example/parameters.txt". (from ImaguSeg_InitFromFile() at ../RunIt.cpp::170)
        [1] => FATAL: Could not open input parameters file "/var/www/sizeme/demo/example/parameters.txt". (from ImaguSeg_InitFromFile() at ../RunIt.cpp::170) ) 

Please guide me.

1 Answer 1

3

Okay.. got solution,

I need to change dir first and then executed command. see below code.

chdir('/var/www/sizeme/demo');
exec('/var/www/sizeme/demo/imaguRunner /var/www/sizeme/demo/example/
parameters.txt',$output,$return_val);

Thank God.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.