foreach ($request->getFiles('review') as $fileName) {
$fileSize = $fileName['size'];
$fileType = $fileName['type'];
$theFileName = $fileName['name'];
$uploadDir = sfConfig::get("sf_upload_dir");
$Contacts_uploads = $uploadDir . '/images';
if (!is_dir($Contacts_uploads))
mkdir($Contacts_uploads, 0777);
$review->setPicture($theFileName);
move_uploaded_file($fileName['tmp_name'], "$Contacts_uploads/$theFileName");
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.