PHPEdit.net Community
   
1 2 3 4
Tutorials Tips Pasties Code Snippets
 

Home > Pasties

Recent Pasties

« < 1 - 2 > »

Create a new one now.

Created on 10/03/2008 08:26 by Anonymous

  1. function CheckFileExtension($file,&$Extension=array())
  2. {
  3.  
  4. if(file_exists($file))
  5. {
  6.  
  7. // ON EXTRAIT L'EXTENSION
  8. $SubstractExt = substr(strrchr($file, "."), 1);
  9.  
View complete code

Created on 10/03/2008 08:23 by Anonymous

  1. ///
  2. function CheckFileExtension($file,&$Extension=array())
  3. {
  4. if(file_exists($file))
  5. {
  6. // ON EXTRAIT L'EXTENSION---> l'extension sera définie même si
    votre fichier se nomme myfile.config.inc, retourne inc
  7. $SubstractExt = substr(strrchr($file, "."), 1);
  8.  
  9.  
View complete code

Created on 07/03/2008 21:22 by Anonymous

  1. .liens { font-family: Arial, Helvetica, sans-serif; font-size: 11px;
    color: #4E4E4E; }
  2. .liens12 { font-family: Arial, Helvetica, sans-serif; font-size: 12px;
    color: #996666; }
  3. .texte12gris { font-family: Arial, Helvetica, sans-serif; font-size:
    12px
    ; color: #666666; }
  4. .texte11gris { font-family: Arial, Helvetica, sans-serif; font-size:
    11px
    ; color: #666666; }
  5. .formsaisie {
  6. font-family: Arial, Helvetica, sans-serif; font-size: 11px; color:
    #333333;
  7. background-color: #FCF7EF;
  8. margin: 4px;
  9.  
View complete code

Created on 29/02/2008 09:44 by harold03

  1. /**
  2. * cette fonction affiche les méthodes et propriétés d'un objet
    (php5)
  3. * exemple :
  4. * $objet=new objetExemple();
  5. * echo($objet);//appel implicite à __tostring
  6. * @return
  7. */
  8. function __tostring()
  9.  
View complete code

Created on 28/02/2008 11:40 by LEGLISE CHARLES EDOUARD

  1. //vérification d'extention
  2.  
  3. function checkExtention( $file){
  4. $file = 'myfile.rar';
  5. $ext_Array = array("zip","rar","jpg","jpeg","gif","bmp");
  6.  
  7. // Check file
  8. if ( file_exists($file)) {
  9.  
View complete code

Created on 02/02/2008 17:23 by jano

  1. echo dd;
View complete code

Created on 31/01/2008 10:14 by Philippe Faribault

  1. Décommenter HTML
  2.  
  3. SelectionEmbed('','','<--','','-->','')
View complete code

Created on 25/01/2008 17:55 by Anonymous

  1. function to_time($value){
  2.  
  3. // SQL Date
  4. $datefields = explode('-', $value);
  5.  
  6. // Must be an English date
  7. if (count($datefields) != 3){
  8. $datefields = explode('/', $value);
  9.  
View complete code

Created on 23/01/2008 23:13 by LetsSurf

  1. if (!function_exists('array_get')) {
  2. function array_get($arr, $key, $default = false) {
  3. if (array_key_exists($key, $arr)) {
  4. return $arr[$key];
  5. } else {
  6. return $default;
  7. }
  8. }
  9.  
View complete code

Created on 23/01/2008 23:13 by LetsSurf

  1. if (!function_exists('human_bytes')) {
  2. function human_bytes($a) {
  3. $unim = array('B', 'KB', 'MB', 'GB', 'TB', 'PB');
  4. $c = 0;
  5. while ($a>=1024) {
  6. $c++;
  7. $a = $a/1024;
  8. }
  9.  
View complete code

 
PHPEdit User Community, © 2008 WaterProof SARL
Powered by PHPEdit