background preloader

URL Rewriting for Beginners

URL Rewriting for Beginners
A beginner's guide to URL rewriting, with plenty of examples. Introduction URL rewriting can be one of the best and quickest ways to improve the usability and search friendliness of your site. There are several other guides on the web already, that may suit your needs better than this one. Apache URL Rewriting Guide - The best guide around Before reading on, you may find it helpful to have the mod_rewrite cheat sheet and/or the regular expressions cheat sheet handy. What is "URL Rewriting"? Most dynamic sites include variables in their URLs that tell the site what information to show the user. The problems with this kind of URL structure are that the URL is not at all memorable. Clearly a much cleaner and shorter URL. Now we're getting somewhere. Unfortunately, the last URL cannot be easily understood by a server without some work on our part. Platforms and Tools . Flags Conditions Related:  Web

Encoder son site intégralement en UTF-8 Il existe deux méthodes en PHP permettant d'afficher du texte en UTF-8. Après avoir bien sûr encodé correctement tous les fichiers selon la manière décrite juste au-dessus. L'une est radicale au niveau du fichier, l'autre se fait au cas par cas, sur chaque texte à afficher. La méthode radicale consiste à mettre en première ligne de chaque fichier, un header qui va préciser au serveur de renvoyer de l'UTF-8 : header( 'content-type: text/html; charset=utf-8' ); L'autre méthode consiste à utiliser une fonction PHP autour du texte que l'on veut afficher en UTF-8 : Fonction utf8_decode() Sélectionnez echo utf8_decode( 'Ici mon texte en UTF-8' ); La différence entre les deux méthodes est flagrante. Faisons un petit test pour nous en convaincre. header( 'content-type: text/html; charset=utf-8' ); echo 'Texte accentué Dans test2.php nous mettons ce code : Ouvrons-les dans le navigateur. Mais pourquoi utf8_DEcode() alors que l'on veut ENcoder en UTF-8 ? Encodage Apache AddDefaultCharset utf-8

'MySQLi' for Beginners Introduction Nearly every site that you visit nowadays has some sort of database storage in place, many sites opt to use MySQL databases when using PHP. However, many people haven't yet taken the step to interacting with databases properly in PHP. Here we guide you through what you should be doing - using PHP's MySQLi class - with a hat-tip to the one way that you definitely shouldn't be doing it. The Wrong Way If you're using a function called mysql_connect() or mysql_query() you really need to take note and change what you're doing. Any of the functions that are prefixed with mysql_ are now being discouraged by PHP themselves as visible on this doc page, instead you should look to use one of the following: Each has its advantages, PDO for example will work with various different database systems, where as MySQLi will only work with MySQL databases. PHP MySQLi Connecting Obviously, the database name is optional and can be omitted. Querying Output query results Number of returned rows <? <?

Appréhender WordPress pour un développeur Appréhender WordPress, c’est comprendre ce que ce CMS propose. Beaucoup de développeurs « qui débutent sur WordPress » auront tendance – au départ – à se précipiter sur le fonctionnel et à utiliser ce qu’ils savent déjà. C’est sans aucun doute la première erreur qu’ils commettront alors qu’ils connaissent très bien l’adage du développeur « ne pas réinventer la roue ». Pour tout framework (Symfony, zend PHP, AngularJs…), le développeur se documentera préalablement et gardera pour référence la documentation officielle. Pour WordPress, la documentation officielle se résume en un mot sur la toile, à savoir : le Codex. Le codex de WordPress Le Codex – disponible en partie en français si nécessaire – est écrit et maintenu par les utilisateurs (environ 25 000 utilisateurs enregistrés). WordPress dispose d’une API à partir de laquelle il est possible de récupérer et d’enregistrer toute information susceptible de servir notre objectif. Les Handbooks de WordPress Développer un thème WordPress

How to: find ANYTHING on the Internet Photo by Dullhunk Tips, tricks and resources to help you find that digital needle in the huge cyber-haystack. Learning to navigate the World Wide Web effectively is an important skill, and there are lots of different ways for you to find the information you are looking for. Using Google Operator Hacks One of the things I love about Google is its clean layout – just type your query and hit enter. Here is a selection of some useful ones: And don’t forget if you want to visit a site that is down, or that your company’s server won’t let you access, you can view the Cached version to see a Google snapshot of that page from when it was last crawled. Photo by author. Finally, if you’re fed up with all the annoying affiliate links clogging up the Google search results, check out Give Me Back My Google. Online Research Conducting online research is about more than just typing a few words into Google, even if you do know the operator hacks! Etymology: Find the root of any word at Etymoline.

Aide:Purge du cache du navigateur Votre navigateur économise la bande passante en stockant des parties de pages Web dans son cache local (normalement sur votre disque dur), de sorte qu'elles ne soient téléchargées qu'une seule fois. Cela concerne le plus souvent les images précédemment affichées, les feuilles de style et le JavaScript. Dans certains cas, cela peut avoir des effets non désirables et parfois déroutants puisque l'évolution récente du site semble être ignorée. Il peut y avoir d'autres anomalies telles que des modifications de l'interface du site ou des changements dans les préférences de l'utilisateur. Lorsque vous rencontrez un comportement étrange, demandez à votre navigateur de purger son cache afin que la page rechargée tienne compte des changements récents. Microsoft Edge[modifier | modifier le code] Recharger une page sans utiliser le cache du navigateur : Soit : effectuer la combinaison de touches Ctrl + F5 ;Soit : cliquer sur le bouton « Rafraîchir » en enfonçant la touche Ctrl. Aide:Purge du cache

5 Awesome Learning Resources For Programmers (To help you and your kids to grow the geek neurons) Happy New Year, this is my first post in 2012. I’ll be sharing few awesome learning resources I’ve bookmarked, and will be pointing out some specific computer/programming related courses I've found interesting from these resources. Also, thought about saving this blog post for my kids as well - instead of investing in these Child education schemes (though they are too small as of today, 2 years and 60 days respectively ). Anyway, personally my new year resolution is to see as much videos from this course collections (assuming I can find some free time in between my regular job && changing my babies diapers). 1 – Khan Academy As I mentioned some time back, you and your kids are missing some thing huge if you havn’t heard about Khan Academy. With a library of over 2,600 videos covering everything from arithmetic to physics, finance, and history and 268 practice exercises, they're on a mission to help you learn what you want, when you want, at your own pace 2 – MIT Open Courseware and Videos

C.M.S WordPress Accueil > CMS WordPress WordPress version 5+ Avis d'utilisateurs Après quelques mois d'utilisation, les avis des utilisateurs... Vidéo filmée sur smartphone - Montage avec l'application INSHOT Un outil de « CMS » (Content Management System, en français Gestion de contenu) est un site web disposant de fonctionnalités de publication et offrant en particulier une interface d'administration (back-office) permettant à un administrateur de site de créer ou organiser les différentes rubriques. WordPress est un système de gestion de contenu (CMS) qui permet de créer et de gérer facilement l’ensemble d’un site web ou simplement un blog. Exemple de site WordPress : Le site d'entreprise - Documentation 1 L'ergonomie du site 2 Les mentions sur votre site internet : les obligations à respecter 3 Le site internet professionnel d’une entreprise : Que doit-il contenir ? La connexion au BackOffice Le profil utilisateur La création d'un utilisateur La connexion d'un utilisateur au backoffice L'apparence du site

Sass vs. LESS "Which CSS preprocessor language should I choose?" is a hot topic lately. I've been asked in person several times and an online debate has been popping up every few days it seems. It's nice that the conversation has largely turned from whether or not preprocessing is a good idea to which one language is best. Let's do this thing. Really short answer: Sass Slightly longer answer: Sass is better on a whole bunch of different fronts, but if you are already happy in LESS, that's cool, at least you are doing yourself a favor by preprocessing. Much longer answer: Read on. The Much Longer Answer The Learning Curve with Ruby and Command Line and Whatever The only learning curve is the syntax. Winner: Nobody Helping with CSS3 With either language, you can write your own mixins to help with vendor prefixes. In Sass, you can use Compass, and Compass will keep itself updated, and thus the prefix situation is handled for you. In LESS, there are also some mixin libraries battling to be the best. See that?

Magasins en ligne Accueil > CMS - Prestashop site de e-commerce Par Fabienne Mauri - Académie de Bordeaux Prestashop version 1.7 Vue d’ensemble L’entreprise & ses informations 1 LES COORDONNÉES 2 LE LOGO 3 LA PAGE D'ACCUEIL 3.1 A propos ou nous connaitre 3.2 Mentions légales 3.3 RGPD - Politique de confidentialité 3.4 Conditions de vente CGV 3.5 Paiements sécurisés 3.6 Positionner les éléments de la page 3.7 Afficher les liens dans le Footer 4 LES MOYENS DE RÈGLEMENT 5 LA GESTION DES MENUS 6 LE CARROUSEL 7 LA BANNIÈRE 8 LA GESTION DES IMAGES 8.1 Formats, dimension & poids d'images 8.2 Dimension des images 8.3 Quelques astuces techniques Le catalogue des produits Les Clients Les commandes Les paiements Le transport Les Modules 1 LES MODULES 1.1 GESTION DES MODULES 1.2 POSITION DES MODULES 2 LA "NEWSLETTER" 2.1 CONFIGURATION DU MODULE * Paramétrage du formulaire * Ajout d'un code PROMO 2.2 DIFFUSION DE LA NEWSLETTER 1 L’ÉQUIPE (ou les employés) 2 LES PROFILS 3 LES PERMISSIONS 4 LA CONNEXION en BACK OFFICE Les Services

Easy Server Side Caching in PHP When developing dynamic web applications there may be many times that data is not updated for a certain amount of time. In PHP it is fairly simple to have a page cached, so that there is not much load on the server. To create this caching you would put some code like the following on the top of your PHP page. $cachefile = 'caching_folder/cachedpage.html'; $cachetime = 30; // Serve from the cache if it is younger than $cachetime if (file_exists($cachefile) && time() - $cachetime < filemtime($cachefile)) { include($cachefile); exit; } ob_start(); // Start the output buffer The things that you would change in the above code is the setting of the $cachfile variable to the name of the static file that the cache will be saving on the server (you will need to set permissions on the folder where you want to save the cached file). Now you would put all of your standard PHP code to create the page after the above code.

Related: