se il mio webhost ha disabilitato tale funzione c'è un'alternativa ad essa?
questa è la funzione dove è presente exec:
private function execute($cmd){
$ret = 100 ;
$out = array();
exec($cmd,$out,$ret);
$this->setOutput( $out );
if ($this->debug) echo "
$cmd (rc: $ret)</p>";
return $ret ;
}
questa è la funzione che richiama execute:
function polaroid( $format = null, $rotation= 6, $borderColor="snow", $shaddowColor = "black", $background="none"){
if (get_class($format) == 'phMagickTextObject' ){
//
}else{
$tmp = new phMagickTextObject();
$tmp->text($format);
$format = $tmp ;
}
$cmd = $this->getBinary('convert');
$cmd .= ' ' . $this->getSource() ;
if ($format->background !== false)
$cmd .= ' -background "' . $format->background . '"';
if ($format->color !== false)
$cmd .= ' -fill "' . $format->color . '"' ;
if ($format->font !== false)
$cmd .= ' -font ' . $format->font ;
if ($format->fontSize !== false)
$cmd .= ' -pointsize ' . $format->fontSize ;
if ($format->pGravity !== false)
$cmd .= ' -gravity ' . $format->pGravity ;
if ($format->pText != '')
$cmd .= ' -set caption "' . $format->pText .'"';
$cmd .= ' -bordercolor "'. $borderColor.'" -background "'.$background.'" -polaroid ' . $rotation .' -background "'. $background.'" -flatten ';
$cmd .= ' ' . $this->getDestination() ;
//echo $cmd .'
';;
$this->execute($cmd); $this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}