wp_upload_bits Upload Specific Sizes Only

This is how you can limit the image upload size function fineima() { if (isset($_POST[‘submit’])) { wp_upload_bits($_FILES[‘fileToUpload’][‘name’], null, file_get_contents($_FILES[‘fileToUpload’][‘tmp_name’])); } echo ‘<form action=”” method=”post” enctype=”multipart/form-data”> <input type=”file” name=”fileToUpload” id=”fileToUpload”> <input type=”submit” value=”Upload Image” name=”submit”> </form> ‘; } function fineFileUploaderRenderer() { ob_start(); fineimageUpload(); return ob_get_clean(); } add_shortcode(‘your_file_uploader’, ‘fineFileUploaderRenderer’);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)