OTP PLUGIN SYMFONY
If you need it, please send me a mail to sakramenta [AT] gmail [DOT] com
Ha szükséged van rá, küldj egy levelet a sakramenta [KUKAC] gmail [PONT] com címre.
Friday, June 15, 2012
Thursday, June 14, 2012
Default Permission In Linux (Debian)
Set Default Permission to 777 for FTP:
- /etc/vsftpd.conf
- local_umask=000
- /etc/init.d/vsftpd restart
- ftp clients have to reconnect.
Monday, June 11, 2012
List Form Errors in Symfony
<?php if( $form->hasErrors() || $form->hasGlobalErrors() ) : ?>
-
<?php foreach( $form->getGlobalErrors() as $name => $error ) : ?>
- <?php echo $name ?> : <?php echo $error ?> <?php endforeach; ?> <?php $errors = $form->getErrorSchema()->getErrors() ?> <?php if ( count($errors) > 0 ) : ?> <?php foreach( $errors as $name => $error ) : ?>
- <?php echo $name ?> : <?php echo $error ?> <?php endforeach; ?> <?php endif; ?>
Friday, June 8, 2012
Doctrine Schema: float(18,4) ?
Use decimal instead of float in this situation:
sale_price_eur:
type: decimal(18)
scale: 4
sale_price_eur:
type: decimal(18)
scale: 4
Monday, June 4, 2012
Unzip with PHP
if(!class_exists('ZipArchive')) die('ZipArchive missing');
$zip = new ZipArchive;
$res = $zip->open('my_zip_file.zip');
if ($res === TRUE) {
$zip->extractTo('my_extract_to_dir/');
$zip->close();
echo 'ok';
} else {
echo 'failed';
}
Labels:
extract,
unzip,
zip,
zip archive,
ZipArchive
Thursday, May 31, 2012
Install the Latest APC on Debian
apt-get install php-pear php5-dev apache2-threaded-dev build-essential
pecl install apc
pecl install apc
Thursday, May 24, 2012
Calling the i18n Function __() in a Form in Symfony
Do not use __() in forms! Use translate:
Subscribe to:
Posts (Atom)