Read a file data using file browser in Jom social (Joomla ) using PHP

It is bit typical to add own php code to take a file into the system using a file browser.
Here below I have attached the code

---------------------------------------------------------------------------
jimport('joomla.filesystem.file');
$jinput = JFactory::getApplication()->input;
$fileInput = new JInput($_FILES);
$file = $fileInput->get('thumb', null, 'array');

 
if(isset($file) && !empty($file['name'])) {
$filename = JFile::makeSafe($file['name']);
$src = $file['tmp_name'];
$data['image']=$filename;

 }
--------------------------------------------------------------------------------

Below I have attached the client code below.




 

Comments

Popular Posts