本文整理匯總了PHP中UploadHandler::set_additional_file_properties方法的典型用法代碼示例。如果您正苦於以下問題:PHP UploadHandler::set_additional_file_properties方法的具體用法?PHP UploadHandler::set_additional_file_properties怎麽用?PHP UploadHandler::set_additional_file_properties使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UploadHandler
的用法示例。
在下文中一共展示了UploadHandler::set_additional_file_properties方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: set_additional_file_properties
protected function set_additional_file_properties($file)
{
parent::set_additional_file_properties($file);
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$sql = 'SELECT `nome`, `type` FROM `' . $this->options['db_table'] . '` WHERE `nome`=?';
$query = $this->db->prepare($sql);
$query->bind_param('s', $file->name);
$query->execute();
$query->bind_result($nome, $type);
while ($query->fetch()) {
$file->id = $nome;
$file->type = $type;
}
}
}
示例2: set_additional_file_properties
protected function set_additional_file_properties($file)
{
parent::set_additional_file_properties($file);
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$sql = 'SELECT `id`, `type`, `description`,`classifier` FROM `' . $this->options['db_table'] . '` WHERE `name`=?';
$query = $this->db->prepare($sql);
$query->bind_param('s', $file->name);
$query->execute();
$query->bind_result($id, $type, $description, $classifier);
while ($query->fetch()) {
$file->id = $id;
$file->type = $type;
$file->description = $description;
$file->classifier = $classifier;
}
}
}
示例3: set_additional_file_properties
protected function set_additional_file_properties($file)
{
parent::set_additional_file_properties($file);
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$sql = 'SELECT `imggrafmed_id`, `imggrafmed_descripcion`, `imggrafmed_size`, `imggrafmed_type`, `imggrafmed_fechar`, `imggrafmed_orden`, `imggrafmed_configuracion` FROM `' . $this->options['db_table'] . '` WHERE `imggrafmed_nombre`=?';
$query = $this->db->prepare($sql);
$query->bind_param('s', $file->name);
$query->execute();
$query->bind_result($id, $descripcion, $size, $type, $fechar, $orden, $configuracion);
while ($query->fetch()) {
$file->id = $id;
$file->descripcion = $descripcion;
$file->size = $size;
$file->type = $type;
$file->fechar = $fechar;
$file->orden = $orden;
$file->configuracion = $configuracion;
}
}
}
示例4: set_additional_file_properties
protected function set_additional_file_properties($file)
{
parent::set_additional_file_properties($file);
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$sql = 'SELECT `incentivoimg_id`, `incentivoimg_nombre`, `incentivoimg_incentivo`, `incentivoimg_fechar`, `incentivoimg_horar`, `incentivoimg_descripcion`, `incentivoimg_tipo`, `incentivoimg_tamanio` FROM `' . $this->options['db_table'] . '` WHERE `name`=?';
$query = $this->db->prepare($sql);
$query->bind_param('s', $file->name);
$query->execute();
$query->bind_result($id, $type, $title, $description, $empresa, $cat, $orden);
while ($query->fetch()) {
$file->id = $id;
$file->type = $type;
$file->title = $title;
$file->description = $description;
$file->empresa = $empresa;
$file->cat = $cat;
$file->orden = $orden;
}
}
}
示例5: set_additional_file_properties
protected function set_additional_file_properties($file)
{
parent::set_additional_file_properties($file);
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$mapper = Core::model('Core/Attachment');
$row = $mapper->getRowByCode($file->name);
//var_dump($row);exit;
if ($row != null) {
$file->id = $row['id'];
$file->type = $row['mime'];
$file->folder = $row['folder'];
$file->url = $row['url'];
$file->code = $row['code'];
$file->create_at = $row['created_at'];
$file->created_by = $row['created_by'];
$file->type_id = $row['type_id'];
$file->filename = $row['filename'];
$file->object_id = $row['object_id'];
}
}
}
示例6: set_additional_file_properties
protected function set_additional_file_properties($file)
{
parent::set_additional_file_properties($file);
// Do not return delete URL
$file->deleteUrl = null;
}