本文整理汇总了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";