Tag: PHP
PHP: Ouvrir un fichier et lire son contenu
//data.txt
a@example.com|Alice
b@example.org|Bill
c@example.com|Charlie
d@example.com|Lewis
PHP: Classe personalisé pour traiter un fichier
of constants for ease of use.
const FOUNDERROR = “Sorry, the file in question does not exist.”;
const PERMERROR = “Sorry, you do not have the proper
Exemple d’une page PHP qui fait appel à elle même*
<html>
<head>
<title>Modifier Cookies</title>
</head>
<body>
<form action ="<?php echo $_
PHP: Ouvrir un Répertoire
<?php
if (file_exists("fichier"))
{
if (is_dir ("fichier"))
{
$fI = opendir("fich
PHP: Obtenir les variables membres et leurs valeurs
<?php
class voiture {
var $parebrises;
var $roues;
function voiture($parebrises, $rou
PHP: Syntaxe d’utilisation de ‘parse_str()’
<?php
// void parse_str(string string[, array variables])
$url = "fname=wj&lname=gore&to=
PHP: Sélectionner un élément du menu ‘select, option’ automatiquement
<?php
$fruits = array('Orange' => 'O',
'Banane' => 'B',
'Pomme' =
PHP: Création d’une page de connexion
<html>
<body>
<form method="post" action="login.php">
<h2>Page de connexion</h2>
<br><br>
Nom d'uti
PHP: Créer un bouton de soumission(submit) automatiquement
<?php
function input_submit($nom_control, $label)
{
print '<input type="submit" name="' . $nom