Skip to content

Instantly share code, notes, and snippets.

View tpphu's full-sized avatar

Tran Phong Phu tpphu

View GitHub Profile
@tpphu
tpphu / gist:5667615
Last active December 17, 2015 20:29
private function _getImageNameAndReceive($name, $subPath = null)
{
$ret_name = '';
/*@var $imageElement Zend_Form_Element_File*/
$imageElement = $this->$name;
if( !empty($imageElement) )
{
$image_name = $imageElement->getFileName(null, false);
if ( !empty($image_name) )
{