Créer un blog en PHP

Septembre 2012

Un blog est un site web qui permet de publier des billets (aussi appelés posts ou articles) et de les afficher par ordre antéchronologique, un peu à la manière d'un journal, d'où le nom : weblog : web + log => "journal sur internet".

Pour créer un blog en PHP, il existe plusieurs solutions :

  • Utiliser un CMS ou un moteur de blog comme Wordpress ou Dotclear
  • Choisir une plateforme d'hébergement de blogs comme Blogger ou Wordpress.com
  • Développer soi-même un blog, à l'aide de PHP et d'une base de données MySQL

Choisir entre Wordpress et Dotclear

Les deux principaux moteurs de blog du marché sont l'américain Wordpress et le français Dotclear.

Wordpress est le moteur de blog le plus utilisé au monde, il a plusieurs avantages, et non des moindres :

  • La facilité d'utilisation (interface simple et ergonomique, installation en 5 minutes...)
  • Communauté très active, beaucoup de plug-ins et thèmes disponibles
  • Extrêmement modulaire et facile à personnaliser, grâce à son API très bien documentée (le codex) et ses hooks
  • Optimisé pour le référencement : URL rewriting natif, pings, sitemap (via des plugins)
  • Protection native contre le spam dans les commentaires, via le plugin Akismet développé par la même équipe que Wordpress
  • Très bonne gestion de l'UTF-8 et donc de tous les alphabets (russe, japonnais, hébreu, chinois...)
  • Compatible PHP 4. Même si PHP 4 est une technologie complètement obsolète, ça peut parfois être utile quand on ne peut pas passer à PHP 5 (pour je ne sais quelle raison obscure)

Par contre il a un énorme inconvénient auquel peu d'utilisateurs prêtent attention lors de leur choix : les performances.

Il n'est pas rare de voir plus de 30 requêtes SQL ainsi qu'un temps d'exécution PHP dépassant 500 ms pour générer une simple page (comme la page d'accueil ou un billet). C'est la contrepartie de la modularité de Wordpress et de fonctionnalités telles que les champs personnalisés (qui nécessitent de faire de nombreuses jointures et de nombreuses requêtes SQL pour remonter toutes les informations dont Wordpress a besoin pour générer les pages).

De l'autre côté, autant le dire tout de suite, Dotclear est assez populaire en France (son pays d'origine), mais il l'est nettement moins dans les autres pays du monde.

À part ça, Dotclear n'a pas grand-chose à envier à Wordpress, si ce n'est sa communauté. On trouve beaucoup moins de plugins et de thèmes pour Dotclear que pour Wordpress. Par contre, Dotclear est beaucoup plus léger pour le serveur, donc si vous avez un site à fort trafic, c'est une différence à ne pas négliger.

Quelle plateforme d'hébergement de blog ?

Si vous ne disposez pas d'un hébergement web et ne souhaitez pas en acheter un, vous pouvez utiliser une plateforme d'hébergement de blog gratuit comme :

L'avantage est bien sûr le prix, par contre vous ne pourrez pas personnaliser votre blog comme on peut le faire quand on héberge soi-même son site.

La page du jour est excel condition couleur, bonne lecture.

Programmer un blog en PHP

Si vous êtes téméraire, vous pouvez créer vous même votre application de blog en PHP.

Même si ça demande un peu de travail, c'est quand même beaucoup plus simple que de créer un forum.

On peut commencer avec simplement une table : posts, qui stockent la liste des billets.

Ensuite on peut y ajouter d'autres tables pour apporter d'autres fonctionnalités :

  • users : liste des utilisateurs du blog, pour permettre à plusieurs personnes d'écrire sur le blog
  • tags : enregistre une liste de tags, qui sont ensuite associés aux posts via une table posts_tags

C'est d'ailleurs un exemple qui est souvent pris dans les tutoriels de Framework web comme Symfony, CodeIgniter ou Ruby on Rails, car c'est à la fois simple à comprendre et à utiliser, et suffisamment élaboré pour voir les différents concepts d'association entre les utilisateurs et les posts, entre les posts et les tags.

Découvrez ce tutoriel photoshop : créer la transparence, photomanipulation à lire tout de suite !

10 commentaires :
commentaire n°3491 par d
d lundi 24 avril 2017, 17:31
dqsf
commentaire n°3492 par dsqddfdsq
dsqddfdsq lundi 24 avril 2017, 17:32
qdsfqdf
commentaire n°3702 par cinamin29@hotmail.com
cinamin29@hotmail.com jeudi 20 septembre 2018, 19:18
Hey. I want to share with all the great news!

A month ago an anonymous source sent me 7 bitcoins of wallets that double the bitcoins you sent and send back your purses twice as much.

I am familiar with blockchain technology and therefore did not believe it.

But my curiosity has gone up.

I sent at my own risk and 0.5 bitcoins to one of these wallets and in just 2 hours, exactly 1 bitcoin came to my wallet.

I was shocked!

Then I started working with these bitcoins wallets and revealed the regularity that one wallet can send 0.5 to 5 bitcoins per day from one purse.

At the moment I have 350 bitcoins of wallets from which I send 350 - 700 bitcoins daily and get twice as much.

For a month, I became a multimillionaire.

Another month I will work and become a billionaire.

I already got what I wanted, I quit my job, paid off all my debts, bought a good house and a car from the Audi RS4.

Now I feel like a human being and live for my own pleasure.

These are the good bitcoins of wallets I earn:

16mKn71otoYgAxij3y6MuCkWKco7MEa7Rn

18WWctFEVNhLJKcg14wmykymx3kySuyTLy

1BC2uQHHUdJzgRog7JMVE5cgWh37NCxwJc

1L2NgRwBXb5kiQ4uNDT5iKHN1As6kkt4rL

17dvrJFxoXA6dDxeGoLx3iVp7ogcbvr2nN

1CnZgLpuPhr9e5PhPEJnDS8fh8HCM5w5oz

1MaRdde6X7SGuoCdFNL2fmgpLomdx7peGC

Now many people improve their financial status with these wallets but keep it a secret from everyone.

I hate poverty, so I share with you all this method of earning, grab a piece of this huge and juicy cake.

I will remind you once again. Send from one bitcoin your wallet strictly from 0.5 to 5 bitcoins per wallet per day, otherwise you will receive the same amount that you sent without doubling.

This scheme of work is completely safe. You can work like me, create a lot of wallets and send them from each of them to the above wallets.
commentaire n°3703 par viviji@msn.com
viviji@msn.com jeudi 20 septembre 2018, 19:18
Hey. I want to share with all the great news!

A month ago an anonymous source sent me 7 bitcoins of wallets that double the bitcoins you sent and send back your purses twice as much.

I am familiar with blockchain technology and therefore did not believe it.

But my curiosity has gone up.

I sent at my own risk and 0.5 bitcoins to one of these wallets and in just 2 hours, exactly 1 bitcoin came to my wallet.

I was shocked!

Then I started working with these bitcoins wallets and revealed the regularity that one wallet can send 0.5 to 5 bitcoins per day from one purse.

At the moment I have 350 bitcoins of wallets from which I send 350 - 700 bitcoins daily and get twice as much.

For a month, I became a multimillionaire.

Another month I will work and become a billionaire.

I already got what I wanted, I quit my job, paid off all my debts, bought a good house and a car from the Audi RS4.

Now I feel like a human being and live for my own pleasure.

These are the good bitcoins of wallets I earn:

16mKn71otoYgAxij3y6MuCkWKco7MEa7Rn

18WWctFEVNhLJKcg14wmykymx3kySuyTLy

1BC2uQHHUdJzgRog7JMVE5cgWh37NCxwJc

1L2NgRwBXb5kiQ4uNDT5iKHN1As6kkt4rL

17dvrJFxoXA6dDxeGoLx3iVp7ogcbvr2nN

1CnZgLpuPhr9e5PhPEJnDS8fh8HCM5w5oz

1MaRdde6X7SGuoCdFNL2fmgpLomdx7peGC

Now many people improve their financial status with these wallets but keep it a secret from everyone.

I hate poverty, so I share with you all this method of earning, grab a piece of this huge and juicy cake.

I will remind you once again. Send from one bitcoin your wallet strictly from 0.5 to 5 bitcoins per wallet per day, otherwise you will receive the same amount that you sent without doubling.

This scheme of work is completely safe. You can work like me, create a lot of wallets and send them from each of them to the above wallets.
commentaire n°3704 par gontraveln2@msn.com
gontraveln2@msn.com jeudi 20 septembre 2018, 19:18
Hey. I want to share with all the great news!

A month ago an anonymous source sent me 7 bitcoins of wallets that double the bitcoins you sent and send back your purses twice as much.

I am familiar with blockchain technology and therefore did not believe it.

But my curiosity has gone up.

I sent at my own risk and 0.5 bitcoins to one of these wallets and in just 2 hours, exactly 1 bitcoin came to my wallet.

I was shocked!

Then I started working with these bitcoins wallets and revealed the regularity that one wallet can send 0.5 to 5 bitcoins per day from one purse.

At the moment I have 350 bitcoins of wallets from which I send 350 - 700 bitcoins daily and get twice as much.

For a month, I became a multimillionaire.

Another month I will work and become a billionaire.

I already got what I wanted, I quit my job, paid off all my debts, bought a good house and a car from the Audi RS4.

Now I feel like a human being and live for my own pleasure.

These are the good bitcoins of wallets I earn:

16mKn71otoYgAxij3y6MuCkWKco7MEa7Rn

18WWctFEVNhLJKcg14wmykymx3kySuyTLy

1BC2uQHHUdJzgRog7JMVE5cgWh37NCxwJc

1L2NgRwBXb5kiQ4uNDT5iKHN1As6kkt4rL

17dvrJFxoXA6dDxeGoLx3iVp7ogcbvr2nN

1CnZgLpuPhr9e5PhPEJnDS8fh8HCM5w5oz

1MaRdde6X7SGuoCdFNL2fmgpLomdx7peGC

Now many people improve their financial status with these wallets but keep it a secret from everyone.

I hate poverty, so I share with you all this method of earning, grab a piece of this huge and juicy cake.

I will remind you once again. Send from one bitcoin your wallet strictly from 0.5 to 5 bitcoins per wallet per day, otherwise you will receive the same amount that you sent without doubling.

This scheme of work is completely safe. You can work like me, create a lot of wallets and send them from each of them to the above wallets.
commentaire n°3705 par gwter@msn.com
gwter@msn.com jeudi 20 septembre 2018, 19:18
Hey. I want to share with all the great news!

A month ago an anonymous source sent me 7 bitcoins of wallets that double the bitcoins you sent and send back your purses twice as much.

I am familiar with blockchain technology and therefore did not believe it.

But my curiosity has gone up.

I sent at my own risk and 0.5 bitcoins to one of these wallets and in just 2 hours, exactly 1 bitcoin came to my wallet.

I was shocked!

Then I started working with these bitcoins wallets and revealed the regularity that one wallet can send 0.5 to 5 bitcoins per day from one purse.

At the moment I have 350 bitcoins of wallets from which I send 350 - 700 bitcoins daily and get twice as much.

For a month, I became a multimillionaire.

Another month I will work and become a billionaire.

I already got what I wanted, I quit my job, paid off all my debts, bought a good house and a car from the Audi RS4.

Now I feel like a human being and live for my own pleasure.

These are the good bitcoins of wallets I earn:

16mKn71otoYgAxij3y6MuCkWKco7MEa7Rn

18WWctFEVNhLJKcg14wmykymx3kySuyTLy

1BC2uQHHUdJzgRog7JMVE5cgWh37NCxwJc

1L2NgRwBXb5kiQ4uNDT5iKHN1As6kkt4rL

17dvrJFxoXA6dDxeGoLx3iVp7ogcbvr2nN

1CnZgLpuPhr9e5PhPEJnDS8fh8HCM5w5oz

1MaRdde6X7SGuoCdFNL2fmgpLomdx7peGC

Now many people improve their financial status with these wallets but keep it a secret from everyone.

I hate poverty, so I share with you all this method of earning, grab a piece of this huge and juicy cake.

I will remind you once again. Send from one bitcoin your wallet strictly from 0.5 to 5 bitcoins per wallet per day, otherwise you will receive the same amount that you sent without doubling.

This scheme of work is completely safe. You can work like me, create a lot of wallets and send them from each of them to the above wallets.
commentaire n°3706 par tammykyger@msn.com
tammykyger@msn.com jeudi 20 septembre 2018, 19:18
Hey. I want to share with all the great news!

A month ago an anonymous source sent me 7 bitcoins of wallets that double the bitcoins you sent and send back your purses twice as much.

I am familiar with blockchain technology and therefore did not believe it.

But my curiosity has gone up.

I sent at my own risk and 0.5 bitcoins to one of these wallets and in just 2 hours, exactly 1 bitcoin came to my wallet.

I was shocked!

Then I started working with these bitcoins wallets and revealed the regularity that one wallet can send 0.5 to 5 bitcoins per day from one purse.

At the moment I have 350 bitcoins of wallets from which I send 350 - 700 bitcoins daily and get twice as much.

For a month, I became a multimillionaire.

Another month I will work and become a billionaire.

I already got what I wanted, I quit my job, paid off all my debts, bought a good house and a car from the Audi RS4.

Now I feel like a human being and live for my own pleasure.

These are the good bitcoins of wallets I earn:

16mKn71otoYgAxij3y6MuCkWKco7MEa7Rn

18WWctFEVNhLJKcg14wmykymx3kySuyTLy

1BC2uQHHUdJzgRog7JMVE5cgWh37NCxwJc

1L2NgRwBXb5kiQ4uNDT5iKHN1As6kkt4rL

17dvrJFxoXA6dDxeGoLx3iVp7ogcbvr2nN

1CnZgLpuPhr9e5PhPEJnDS8fh8HCM5w5oz

1MaRdde6X7SGuoCdFNL2fmgpLomdx7peGC

Now many people improve their financial status with these wallets but keep it a secret from everyone.

I hate poverty, so I share with you all this method of earning, grab a piece of this huge and juicy cake.

I will remind you once again. Send from one bitcoin your wallet strictly from 0.5 to 5 bitcoins per wallet per day, otherwise you will receive the same amount that you sent without doubling.

This scheme of work is completely safe. You can work like me, create a lot of wallets and send them from each of them to the above wallets.
commentaire n°3707 par rpeckman@msn.com
rpeckman@msn.com jeudi 20 septembre 2018, 19:18
Hey. I want to share with all the great news!

A month ago an anonymous source sent me 7 bitcoins of wallets that double the bitcoins you sent and send back your purses twice as much.

I am familiar with blockchain technology and therefore did not believe it.

But my curiosity has gone up.

I sent at my own risk and 0.5 bitcoins to one of these wallets and in just 2 hours, exactly 1 bitcoin came to my wallet.

I was shocked!

Then I started working with these bitcoins wallets and revealed the regularity that one wallet can send 0.5 to 5 bitcoins per day from one purse.

At the moment I have 350 bitcoins of wallets from which I send 350 - 700 bitcoins daily and get twice as much.

For a month, I became a multimillionaire.

Another month I will work and become a billionaire.

I already got what I wanted, I quit my job, paid off all my debts, bought a good house and a car from the Audi RS4.

Now I feel like a human being and live for my own pleasure.

These are the good bitcoins of wallets I earn:

16mKn71otoYgAxij3y6MuCkWKco7MEa7Rn

18WWctFEVNhLJKcg14wmykymx3kySuyTLy

1BC2uQHHUdJzgRog7JMVE5cgWh37NCxwJc

1L2NgRwBXb5kiQ4uNDT5iKHN1As6kkt4rL

17dvrJFxoXA6dDxeGoLx3iVp7ogcbvr2nN

1CnZgLpuPhr9e5PhPEJnDS8fh8HCM5w5oz

1MaRdde6X7SGuoCdFNL2fmgpLomdx7peGC

Now many people improve their financial status with these wallets but keep it a secret from everyone.

I hate poverty, so I share with you all this method of earning, grab a piece of this huge and juicy cake.

I will remind you once again. Send from one bitcoin your wallet strictly from 0.5 to 5 bitcoins per wallet per day, otherwise you will receive the same amount that you sent without doubling.

This scheme of work is completely safe. You can work like me, create a lot of wallets and send them from each of them to the above wallets.
commentaire n°3708 par iparky@yahoo.com
iparky@yahoo.com jeudi 20 septembre 2018, 19:18
Hey. I want to share with all the great news!

A month ago an anonymous source sent me 7 bitcoins of wallets that double the bitcoins you sent and send back your purses twice as much.

I am familiar with blockchain technology and therefore did not believe it.

But my curiosity has gone up.

I sent at my own risk and 0.5 bitcoins to one of these wallets and in just 2 hours, exactly 1 bitcoin came to my wallet.

I was shocked!

Then I started working with these bitcoins wallets and revealed the regularity that one wallet can send 0.5 to 5 bitcoins per day from one purse.

At the moment I have 350 bitcoins of wallets from which I send 350 - 700 bitcoins daily and get twice as much.

For a month, I became a multimillionaire.

Another month I will work and become a billionaire.

I already got what I wanted, I quit my job, paid off all my debts, bought a good house and a car from the Audi RS4.

Now I feel like a human being and live for my own pleasure.

These are the good bitcoins of wallets I earn:

16mKn71otoYgAxij3y6MuCkWKco7MEa7Rn

18WWctFEVNhLJKcg14wmykymx3kySuyTLy

1BC2uQHHUdJzgRog7JMVE5cgWh37NCxwJc

1L2NgRwBXb5kiQ4uNDT5iKHN1As6kkt4rL

17dvrJFxoXA6dDxeGoLx3iVp7ogcbvr2nN

1CnZgLpuPhr9e5PhPEJnDS8fh8HCM5w5oz

1MaRdde6X7SGuoCdFNL2fmgpLomdx7peGC

Now many people improve their financial status with these wallets but keep it a secret from everyone.

I hate poverty, so I share with you all this method of earning, grab a piece of this huge and juicy cake.

I will remind you once again. Send from one bitcoin your wallet strictly from 0.5 to 5 bitcoins per wallet per day, otherwise you will receive the same amount that you sent without doubling.

This scheme of work is completely safe. You can work like me, create a lot of wallets and send them from each of them to the above wallets.
commentaire n°3709 par charliesorrell@hotmail.com
charliesorrell@hotmail.com jeudi 20 septembre 2018, 19:18
Hey. I want to share with all the great news!

A month ago an anonymous source sent me 7 bitcoins of wallets that double the bitcoins you sent and send back your purses twice as much.

I am familiar with blockchain technology and therefore did not believe it.

But my curiosity has gone up.

I sent at my own risk and 0.5 bitcoins to one of these wallets and in just 2 hours, exactly 1 bitcoin came to my wallet.

I was shocked!

Then I started working with these bitcoins wallets and revealed the regularity that one wallet can send 0.5 to 5 bitcoins per day from one purse.

At the moment I have 350 bitcoins of wallets from which I send 350 - 700 bitcoins daily and get twice as much.

For a month, I became a multimillionaire.

Another month I will work and become a billionaire.

I already got what I wanted, I quit my job, paid off all my debts, bought a good house and a car from the Audi RS4.

Now I feel like a human being and live for my own pleasure.

These are the good bitcoins of wallets I earn:

16mKn71otoYgAxij3y6MuCkWKco7MEa7Rn

18WWctFEVNhLJKcg14wmykymx3kySuyTLy

1BC2uQHHUdJzgRog7JMVE5cgWh37NCxwJc

1L2NgRwBXb5kiQ4uNDT5iKHN1As6kkt4rL

17dvrJFxoXA6dDxeGoLx3iVp7ogcbvr2nN

1CnZgLpuPhr9e5PhPEJnDS8fh8HCM5w5oz

1MaRdde6X7SGuoCdFNL2fmgpLomdx7peGC

Now many people improve their financial status with these wallets but keep it a secret from everyone.

I hate poverty, so I share with you all this method of earning, grab a piece of this huge and juicy cake.

I will remind you once again. Send from one bitcoin your wallet strictly from 0.5 to 5 bitcoins per wallet per day, otherwise you will receive the same amount that you sent without doubling.

This scheme of work is completely safe. You can work like me, create a lot of wallets and send them from each of them to the above wallets.
facultatif
Facebook Twitter RSS Email
Forum Excel
Venez découvrir le nouveau forum excel question/réponse à la stackoverflow.com !
Forum Excel
hit parade n'en a rien a foutre du W3C Positionnement et Statistiques Gratuites Vincent Paré