0

I want to execute an application which is gams in php I insert the path file location below It shows error how can I correct it?

$modelfile = 'trnsport_php.gms';
if (!system('C:/Documents and Settings/Parsa/My Documents/gamsdir/projdir'.$modelfile.' lo=2')) {
  print "error";
}
2
  • Looks like you are using a Windows system. Shouldn't / be \ ? Commented Feb 14, 2012 at 8:49
  • Yes,I tried \ too but no result Commented Feb 14, 2012 at 8:51

1 Answer 1

1

You should add a "/" after

!system('C:/Documents and Settings/Parsa/My Documents/gamsdir/projdir
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks No It doesn't work I found new things I was in a big mistake it is like running in shell so I asked this one stackoverflow.com/questions/9326633/…
You might want to use "if system(...) === FALSE" since it outputs a boolean FALSE on error. !(system(...)) might also evaluate to true when system returns an empty line or "0".

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.