cleary1981 Posted December 12, 2008 Share Posted December 12, 2008 Hi, I use the below code with apache fop to generate a pdf document. What I want to do however is name the pdf a different name on each execution using a variable for the pdf name. file_put_contents('example3.xml', $xml_output); //echo $xml_output; exec('fop -xml example3.xml -xsl pdffo.xsl -pdf A4drawing.pdf'); header('Location: A4drawing.pdf'); Link to comment https://forums.phpfreaks.com/topic/136658-solved-use-variable-in-exec-command/ Share on other sites More sharing options...
Mark Baker Posted December 12, 2008 Share Posted December 12, 2008 file_put_contents('example3.xml', $xml_output); $sampleValue = 1; //echo $xml_output; exec('fop -xml example3.xml -xsl pdffo.xsl -pdf A4drawing'.$sampleValue.'.pdf'); header('Location: A4drawing'.$sampleValue.'.pdf'); And do whatever you need with $sampleValue to increment it Link to comment https://forums.phpfreaks.com/topic/136658-solved-use-variable-in-exec-command/#findComment-713548 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.