本文整理匯總了PHP中ImageHandler::load方法的典型用法代碼示例。如果您正苦於以下問題:PHP ImageHandler::load方法的具體用法?PHP ImageHandler::load怎麽用?PHP ImageHandler::load使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ImageHandler
的用法示例。
在下文中一共展示了ImageHandler::load方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: ImageHandler
<?php
$query = "SELECT * FROM articulos WHERE codigo = " . $_REQUEST['codigo'];
$result = mysql_query($query);
if (mysql_num_rows($result) > 0) {
$action_message = "El código ya ha sido utilizado";
return;
}
include_once "include/image_handler.php";
$image = new ImageHandler("images/articulos/");
$ImagenSubida = $image->load();
$query = "\n INSERT INTO articulos (\n codigo,\n descripcion,\n categoria,\n proveedor,\n marca,\n costo,\n precio,\n alicuota,";
if ($ImagenSubida) {
$query .= "imagen,";
}
$query .= " resumen, existencia) VALUES (\n '" . $_REQUEST['codigo'] . "',\n '" . htmlspecialchars(addslashes($_REQUEST['descripcion'])) . "',\n " . $_REQUEST['categoria'] . ",\n " . $_REQUEST['proveedor'] . ",\n " . $_REQUEST['marca'] . ",\n " . $_REQUEST['costo'] . ",\n " . $_REQUEST['precio'] . ",\n " . $_REQUEST['alicuota'] . ",";
if ($ImagenSubida) {
$query .= "'" . $ImagenSubida . "',";
}
$query .= "'" . htmlspecialchars(addslashes($_REQUEST['resumen'])) . "', 0)";
if (!mysql_query($query)) {
$action_message = mysql_error();
return;
}
$action_message = "Se ha agregado el artículo";