Spotlight was not searching into certain files, even if simple text files (in my case .INI files)
- Download TextWrangler.app from the App Store.
Spotlight was not searching into certain files, even if simple text files (in my case .INI files)
Pour référence, voici la fonction slug que j'utilise en php quand j'en ai besoin
function slug($string) {
return strtolower(trim(preg_replace('~[^0-9a-z]+~i', '-', html_entity_decode(preg_replace('~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|copy|th|tilde|uml);~i', '$1', htmlentities($string, ENT_QUOTES, 'UTF-8')), ENT_QUOTES, 'UTF-8')), '-'));
}
Inspiré de stackoverflow.com/questions/2103797
Pour itérer récursivement sur un dossier en php, vous pouvez utiliser le code suivant :
$iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($pathname),
RecursiveIteratorIterator::SELF_FIRST
);
Exemple : Changer les droits des éléments inclus dans un dossier :
$pathname = "/chemin/du/dossier/";
<?php | |
$pathname = __DIR__."/filestoaggregate"; | |
$tab[0] = array("firstname","lastname","gender","email","code","newsletter","variable","giftcode"); | |
$separator = "="; | |
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($pathname), RecursiveIteratorIterator::SELF_FIRST); | |
$i = 1; | |
foreach($iterator as $item) { |
<div class = "global"> | |
<div class = "titre">titre</div> | |
<div class = "left"> | |
image | |
</div> | |
<div class = "right"> | |
Nom agence | |
Adresse<p> |
Rendre youtube (ou n'importe quel iframe responsive) | |
HTML : | |
<div class="wrapper"> | |
<div class="h_iframe"> | |
<!-- a transparent image is preferable --> | |
<img class="ratio" src="http://placehold.it/16x9"/> | |
<iframe src="http://www.youtube.com/embed/WsFWhL4Y84Y" frameborder="0" allowfullscreen></iframe> | |
</div> |
administrer-un-serveur-dedie-part-7-backup-mysql : http://vincent.dauce.fr/administrer-un-serveur-dedie-part-7-backup-mysql/