You didn't seem to get the message.
File uploading/sharing scripts are not allowed on x10hosting.
You didn't seem to get the message.
File uploading/sharing scripts are not allowed on x10hosting.
Nothing is always absolutely so.
Rather than asking for help every time you get a warning about the deprecated POSIX regex functions, read the PHP manual page on the differences between POSIX and PCRE regexes and learn to do the conversion yourself. It's not hard at all.
Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.Misson, not Mission.
try
PHP Code:list($width, $height) = getimagesize($image_tmp);
if (@eregi('\.jpg$', $image_tmp)){
$image = imagecreatefromjpeg($image_tmp);
}else if (@eregi('\.gif$', $image_tmp)){
$image = imagecreatefromgif($image_tmp);
}else if (@eregi('\.png$', $image_tmp)){
$image = imagecreatefrompng($image_tmp);
}else{
RedirectMessage("upload", "Unable to read preview image. Invalid format. Supported Formats: jpg, gif, png");
}
$ratio = $height/$width;
@sonicx.forums65: suppressing warnings only works in the short term. Long term, calls to the POSIX regex functions need to be replaced with PCRE. See "PHP 5.3 Help" for more.
Not that it matters much to the OP, since his site breaks X10's terms of service. Others with the same issue, however, will need the long term solution.
Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.Misson, not Mission.