fileupload_insert

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

developer/examples/fileupload.module, строка 203

Версии
5
fileupload_insert($node)

Implementation of hook_insert().

The node is being created, save the file's infomation to the database.

Код

<?php
function fileupload_insert($node) {
  $file = $node->file;
  db_query("INSERT INTO {fileupload} (nid, filename, filepath, filemime, filesize) VALUES (%d, '%s', '%s', '%s', %d)", $node->nid, $file->filename, $file->filepath, $file->filemime, $file->filesize);
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему