i’ve problem in uploading images in my custom module in magento..
i used core php ccoding for this purpose but magento is not uploading image..
i used same code to upload file in my local xampp.
but that code is not working on my server..
i also use this code but it also not working….
$path = Mage::getBaseDir().DS.'customer_documents'.DS; //desitnation directory
$fname = $_FILES['docname']['name']; //file name
$uploader = new Varien_File_Uploader('docname'); //load class
$uploader->setAllowedExtensions(array('doc','pdf','txt','docx')); //Allowed extension for file
$uploader->setAllowCreateFolders(true); //for creating the directory if not exists
$uploader->setAllowRenameFiles(false); //if true, uploaded file's name will be changed, if file with the same name already exists directory.
$uploader->setFilesDispersion(false);
$uploader->save($path,$fname); //save the file on the specified path
I had added this line in my code and it’s working..
after this write this code