Jump to content

Erreur ouverture fichier PDF (facture)


Recommended Posts

Bonjour

lorsque j'essaie de voir ma facture en pdf, j'ai cette erreur..

Notice: iconv() [function.iconv]: Detected an illegal character in input string in /var/www/vhosts/xxxxxxx.com/httpdocs/classes/Tools.php on line 703
FPDF error: Some data has already been output, can't send PDF file

comment regler ca?

merci

Link to comment
Share on other sites

Le module iconv est une extension PHP. Son activation a donc lieu lors de la compilation de PHP. Donc tu as dû modifier quelque chose, non ?
Peux tu mettre la partie de ton fichier Tools.php ici ? car tu as un souci dans l'enclenchement de la tamporisation de sortie...

Link to comment
Share on other sites

/**
* Generate date form
*
* @param integer $year Year to select
* @param integer $month Month to select
* @param integer $day Day to select
* @return array $tab html data with 3 cells :['days'], ['months'], ['years']
*
*/
static public function dateYears()
{
for ($i = date('Y') - 10; $i >= 1900; $i--)
$tab[] = $i;
return $tab;
}

static public function dateDays()
{
for ($i = 1; $i != 32; $i++)
$tab[] = $i;
return $tab;
}

static public function dateMonths()
{
for ($i = 1; $i != 13; $i++)
$tab[$i] = date('F', mktime(0, 0, 0, $i, date('m'), date('Y')));
return $tab;
}

static public function hourGenerate($hours, $minutes, $seconds)
{
return implode(':', array($hours, $minutes, $seconds));
}

static public function dateFrom($date)
{
$tab = explode(' ', $date);
if (!isset($tab[1]))
$date .= ' ' . Tools::hourGenerate(0, 0, 0);
return $date;
}

static public function dateTo($date)
{
$tab = explode(' ', $date);
if (!isset($tab[1]))
$date .= ' ' . Tools::hourGenerate(23, 59, 59);
return $date;
}

static public function getExactTime()
{
return time()+microtime();
}

static function strtolower($str)
{
if (function_exists('mb_strtolower'))
return mb_strtolower($str, 'utf-8');
return strtolower($str);
}

static function strlen($str)
{
if (function_exists('mb_strlen'))
return mb_strlen($str, 'utf-8');
return strlen($str);
}

static function strtoupper($str)
{
if (function_exists('mb_strtoupper'))
return mb_strtoupper($str, 'utf-8');
return strtoupper($str);
}

static function ucfirst($str)
{
$str[0] = self::strtoupper($str[0]);
return $str;
}


static public function orderbyPrice(&$array,$orderWay)
{
foreach($array as &$row)
$row['price_tmp'] = Product::getPriceStatic($row['id_product'], true, ((isset($row['id_product_attribute']) AND !empty($row['id_product_attribute'])) ? intval($row['id_product_attribute']) : NULL), 2);
if(strtolower($orderWay) == 'desc')
uasort($array,"Tools::cmpPriceDesc");
else
uasort($array,"Tools::cmpPriceAsc");
foreach($array as &$row)
unset($row['price_tmp']);
}

/**
* Compare 2 price to sort Categories by price
*
* @param integer $a
* @param integer $b
* @return bool
*/

static public function cmpPriceDesc($a,$B)
{
return ($a['price_tmp'] < $b['price_tmp']) ? 1 : -1;
}

static public function cmpPriceAsc($a,$B)
{
return ($a['price_tmp'] < $b['price_tmp']) ? -1 : 1;
}

static public function iconv($from, $to, $string)
{
if(function_exists("iconv"))
return iconv($from, $to, $string);
$converted = htmlentities($string, ENT_NOQUOTES, $from);
$converted = html_entity_decode($converted, ENT_NOQUOTES, $to);
return $converted;
}

}

?>

c'est bon?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...