//To set the session
Initialize the session name space
$this->nameSpace = new Zend_Session_Namespace('HN');
$this->nameSpace->userId = 'userId';
//To get the session value
Initialize the session name space
$this->nameSpace = new Zend_Session_Namespace('HN');
$userId = $this->nameSpace->userId;
How to get the config variables in Zend Framework
$config = new Zend_Config_Ini(
APPLICATION_PATH . '/configs/application.ini',
'production'
);
$config->resources->db->params->dbname;
$config->resources->db->params->username;
APPLICATION_PATH . '/configs/application.ini',
'production'
);
$config->resources->db->params->dbname;
$config->resources->db->params->username;
How to get the $_SERVER variables in Zend Framework
We can get this by calling the method $this->getRequest()->getServer() in the Zend_Controller_Action
How to remove the session name space in Zend Framework
Session name space can be removed using the function
Zend_Session::namespaceUnset($nameOfspace)
Zend_Session::namespaceUnset($nameOfspace)
How to remove the recipients in the Zend Framework
We can use the clearRecipients function in the Zend_Mail class
Zend_Mail::clearRecipients();
Zend_Mail::clearRecipients();
check and uncheck the all checkbox using javascript
/**
pass the checkbox_name array
**/
function checkAll(form_object, checkbox_name)
{
for(var i=0; i < form_object[checkbox_name].length; i++)
{
form_object[checkbox_name][i].checked = true;
}
}
function uncheckAll(form_object, checkbox_name)
{
for(var i=0; i < form_object[checkbox_name].length; i++){
form_object[checkbox_name][i].checked = false;
}
}
pass the checkbox_name array
**/
function checkAll(form_object, checkbox_name)
{
for(var i=0; i < form_object[checkbox_name].length; i++)
{
form_object[checkbox_name][i].checked = true;
}
}
function uncheckAll(form_object, checkbox_name)
{
for(var i=0; i < form_object[checkbox_name].length; i++){
form_object[checkbox_name][i].checked = false;
}
}
Convert video file to .flv format
xec("ffmpeg -i '/home/tut2pr8c/public_html/videos/$video_file' -ar 22050 -ab 32 -f flv -y -s 400x320 /home/tut2pr8c/public_html/video_flv/$new_video_file_name");
exec("ffmpeg -i '/home/tut2pr8c/public_html/videos/$video_file' -ar 22050 -ab 32 -f flv -y -s 400x320 /home/tut2pr8c/public_html/video_flv/$new_video_file_name");
exec("ffmpeg -i '/home/tut2pr8c/public_html/videos/$video_file' -ar 22050 -ab 32 -f flv -y -s 400x320 /home/tut2pr8c/public_html/video_flv/$new_video_file_name");
Subscribe to:
Posts (Atom)