java - exec command is not working in php script -


i have java file , generate itunes report. want execute within php script. im using exec() function in php:it working in linux.but not in windows.am missing anything?any appreciated.

exec("java autoingestion ".'username'." '".'password'."' ".'vendorid'." ".'report_type'." ".'date_type'." ".'report_sub_type'." ".'2012-05-28'."",$output,$return); 

check result of string concatenation. looks little iffy:

"java autoingestion username 'password' vendorid report_type date_type report_sub_type 2012-05-28" 

you not using variables, or else, there no reason concatenate stuff.

even if capitalized parts placeholders not have concatenate. use variable interpolation:

$username = 'username'; $password = 'password'; $exec = "java autoingestion '{$username}', '{$password}', ..."; exec($exec); 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -