本文整理汇总了PHP中uploader::upload_validate方法的典型用法代码示例。如果您正苦于以下问题:PHP uploader::upload_validate方法的具体用法?PHP uploader::upload_validate怎么用?PHP uploader::upload_validate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类uploader
的用法示例。
在下文中一共展示了uploader::upload_validate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
include "../../connection/phpmysqlconnect.php";
include "../../lib/CRUD_lib.php";
include "../../lib/miss_lib.php";
// post data
// File processing
$ext_array = array("jpeg", "jpg", "png");
$mime_array = array("image/jpeg", "image/jpg", "image/png");
$location = "../../media/featured_product/";
$image = new uploader();
if ($image->upload_validate($_FILES['files'], $ext_array, $mime_array) == true) {
$image_name = $image->upload($_FILES['files'], $location);
$column = array('logo');
$value = array($image_name);
$insert = new crud($conn, 'featured-product', $column, $value);
$insert->insert();
$move = new alert_redirect();
$move->moveWithAlert('Logo has been added', '../../pages/distributor-logo.php');
}
$move->moveWithAlert('Error in uploading image', '../../pages/distributor-logo.php');