Get all images in uploads directory and list them

$upload_dir['baseurl'] should be $upload_dir['basedir']. You want the server path, not the URL of the directory.

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