Skip to content

PHP codes and news

Open Menu
May 31, 2012

PHP: Uploader un fichier et le déplacer vers un répertoire temporaire

<html>
<head><title>Télécharger un fichier</title></head>
<body>
<?php
if ($_SERVER['REQUEST_METHOD
May 30, 2012

Convertir un nombre décimal à un nombre hexadécimal

<html>
<head>
<title> Fonction Mathématique</title>
</head>
<body>
<?php

   print dechex(27);    /
user
May 29, 2012

Lister le contenu du répertoire courant

<?php
  // Le répertoire courant
   $dI = opendir('./');
   while ($fichier = readdir($dI))
   {
  
user
May 29, 2012

PHP: Terminer une session

<?
session_start();

if (isset($_COOKIE[nom_session()]))
{
    setcookie(nom_session(), '', time()-
user
May 28, 2012

Expression Régulière: Découper un URL

<?php
   $url = "http://www.exemple.com";

   morceaux = ereg("^(http://www).([[:alnum:]]+).([[:aln
user
May 27, 2012

Ajouter l’ID de la session dans la table des notes d’apache apache request notes” “

        
<?php
apache_note('session_id', session_id());
?>
  
         
user
May 26, 2012

Utilisation de calendrier français à l’aide de contsant ‘CAL_FRENCH’

<?php

$jd = cal_to_jd(CAL_FRENCH, 3, 1, 11);

$cal_francais = cal_from_jd($jd, CAL_FRENCH);
print_
user
May 25, 2012

PHP: Créer une connexion à une base de données

<html>
<head>
<title>Base de données</title>
</head>
<body>

<?php

  $hote="localhost"; //définir 
user
May 24, 2012

Vérifier si une valeur est numérique ou non

<?php
$a = 25;
echo "is_numeric($a) = " . (is_numeric($a) ? "oui" : "non") . "
";

$a = 25.5;
echo 
user
May 23, 2012

Utilisation des Balises HTML dans l’affichage

 <html>
  <head>
   <title>Formatage HTML</title>
  </head>
 <body>

<?php

 $design="<select size='
user

Posts navigation

Older posts
Newer posts

Recent Posts

  • Hello world!
  • PHP Session et Cookies: Exemple d’utilisation de session_start()
  • PHP: Fermer un fichier avec la fonction fclosde()
  • PHP: Vérifier si un élément est un répertoire
  • PHP: Vérifier si un fichier existe sinon le créer

Recent Comments

  1. A WordPress Commenter on Hello world!
© 2025 PHP codes and news
 / Theme: Really Simple / License: GPLv3