コード例 #1
0
    $ext = end(explode('.', $iname));
    if ($ext == "gif" || $ext == "jpeg" || $ext == "jpg" || $ext == "png" && $size > 30) {
        $iname = uniqid();
        //$ext=end(explode('.',$name));
        $fullname = $iname . "." . $ext;
        $target = "upload/";
        $uri = $target . $fullname;
        if (move_uploaded_file($_FILES['img']['tmp_name'], $uri)) {
            //echo "Success<br>";
            //echo "Image id: $iname"."<br>";
        } else {
            echo "Failed";
        }
    }
    $userAvatar = new userAvatar();
    $userAvatar->store($uid, $iname, $uri, $size, $type);
    //$user->save($uid,$iname,$uri,$size,$type);
}
if (isset($_POST['edit'])) {
    $user->load($uid);
}
?>

<html>
<form name="frm" method="post" enctype="multipart/form-data">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<style><!--
	 body{
	 font-family:Arial, Helvetica, sans-serif;
	 }
	 h1{