Problem calling shell script from PHP which calls Java -


first have tell you, i'm french guy, can make mistake english ;-)

here problem : want use java processor transform xml file. made shell script wich working well. when execute shell script php doesn't work ...

// tried $resultat = shell_exec("sh ".$chemin."script.sh"); // , after $resultat = shell_exec("java -jar ". $jar ." -s:".$source." -xsl:".$xslt); 

the file "script.sh" contains :

jar='lib/saxon/saxon9he.jar' source='temp/fichier_xml.xml' result="temp/output.xml" xslt="xml_to_xml.xsl"  java -jar $jar -s:$source -xsl:$xslt 

i think that's problem java ... can not resolve !!

if have idea me,

thanks

try using script in backticks i.e. ``


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -