This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); | |
if (1) { | |
$configuration = ProjectConfiguration::getApplicationConfiguration('backend', 'prod', false); | |
} else { | |
$configuration = ProjectConfiguration::getApplicationConfiguration('backend', 'dev', false); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$msg = ''; | |
foreach( $form->getFormFieldSchema( ) as $name => $formField ) | |
{ | |
if( $formField->getError( ) != "" ) | |
{ | |
$msg = $name . " : " . $formField->getError( ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
search_files('/home/gabi/test/', '.png'); | |
function search_files($dir, $extension) { | |
$extension_length = strlen($extension); | |
$rit = new RecursiveDirectoryIterator($dir); | |
foreach(new RecursiveIteratorIterator($rit) as $file) { | |
if(strcasecmp(substr($file, -$extension_length), $extension) == 0) { | |
echo "$file\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returneaza rezultatul sub forma unui array flat pe care poti | |
* sa-l transformi usor intr-un string | |
*/ | |
tree_walk_recursive($src) | |
{ | |
$result = array(); | |
foreach($src as $key => $value) | |
{ |