LinksTraffic

Php - lire et mettre à jour un fichier

english directory french directory
Recherche: Recherche avancée

Accueil Webmaster | Tutoriaux | Web Scripts

lignemobile.com

Php - lire et mettre à jour un fichier

Faites un copier coller du code ci-dessous et lancez le dans votre navigateur.
Si vous souhaitez voir le résultat en démo (selon nous une bonne méthode d'apprentissage) cliquez ici (nouvelle fenêtre).

This example actually updates the file according to a date and a number; if the line contains the current date, it increments the number otherwise it adds another line with the current date.
Everyday a line is then added and a new counter is initiated.

The source code:

Notes:
- the file is automatically created if it does not exists (see writing into a file for more details);
- you need to have the necessary permissions to be able to write into a file on your server (see chmod on linux/unix).

You may wish to read additional materials from:
- http://www.php.net/manual/en/function.fgets.php
- http://www.php.net/sscanf

Commentaires

Poster un commentaire
ou venez en discuter sur:
Forum - Php

Coin du Webmaster

Vous disposez d'un site à forte audience?

Obtenez votre Kit Graphique pour vos sites!

Engagez des Freelance Pro.

1and1 Internet

Categories

Copyright 2004-2008 @ LinksTraffic RHM Solution ::: Partners | Privacy | Contact us form