-------------------------------------------------- --------------------------------------------------
A non well formed numeric value encountered=>
From the literal meaning, you can roughly get a glimpse of some meaning: encountering a numerical value that is not well formed;
ok, we guess that one of the parameter types may be wrong. We need to pass in a numeric type but it may actually be a string.
------------------------@ chenwei
So, to solve this problem, first check whether the parameter types passed in your custom function are consistent with those actually used.
For example: bool imagecopymerge ( resource $dst_im
, resource $src_im
, int $dst_x
, int $dst_y
, int$src_x
, int $src_y
, int $src_w
, int $src_h
, int $pct
);
Several of the parameters specifying position, width and height are all int (integer). If you accidentally pass in the 'px' unit, an error will be reported.
---------------------------------------- -------------------------------------------------- ----------
You can process the data in many ways before passing it in, such as:
$str = '1px';
echo intval($str); //1
echo rtrim($str, 'px'); //1
------------------------------------------------------------------------------------------------