This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Placer sur FTP -créer un fichier test | |
// a��� si vous voyez ces charactères s'afficher, ouvrir notepad ++ | |
// Onglet Encodage, ensuite convertir en UTF-8 | |
$str = 'aéôà'; | |
echo '<!DOCTYPE html> | |
<html lang="fr"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Créer un lien logout | |
//rediriger vers la page login.php | |
// Sur la page login.php ajouter le code ci-dessous | |
// Voir plus : https://www.php.net/manual/fr/function.session-destroy.php | |
<?php | |
// Initialisation de la session. | |
// Si vous utilisez un autre nom | |
// session_name("autrenom") | |
session_start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$chemin = getcwd(); | |
echo "Votre chemin absolu est:"; | |
echo $chemin; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iframe width="100%" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=50.7164189,4.607744&hl=es;z=14&output=embed"></iframe> | |
<br /> | |
<p><small> | |
<a href="https://maps.google.com/maps?q=50.7164189,4.607744&hl=es;z=14&output=embed" style="color:#0000FF;text-align:left" target="_blank"> | |
Voir sur la carte</a> | |
</small></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Obtenir le chemin réel pour notre dossier | |
$rootPath = realpath('/home/site/dossier/httpdocs/votre-repartoire-a-zipper/'); | |
// Initialise un objet d'archive | |
$zip = new ZipArchive(); | |
//Nom du dossier une fois zipper, il sera enregistrer à l'endroit ou se trouve votre fichier zip.php | |
$zip->open('file.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE); | |
// Créer un itérateur de répertoire récursif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Test connection DB</title> | |
</head> | |
<body> | |
<?php | |
$servername = "localhost"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- ################### apès le </Header> ################# --> | |
<section> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-lg-8 mx-auto"> | |
<h2 class="font-weight-light">About this page</h2> | |
<p class="lead">This is a great place to talk about your webpage. This template is purposefully unstyled so you can use it as a boilerplate or starting point for you own landing page designs! This template features:</p> | |
<ul> | |
<li>Clickable nav links that smooth scroll to page sections</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- test script --> | |
<div id="demo"><a href='#' class='btn btn-lg btn-primary'>Je suis pas un robots</a></div> | |
<script> | |
document.getElementById('demo').onclick = function changeContent() { | |
document.getElementById('demo').innerHTML = "<a href='#' class='btn btn-success btn-lg'>Envoyer</a>"; | |
} | |
</script> | |
<!-- Fin test script --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//$heures = 15; // les heures < 24 | |
//$minutes = 2; // les minutes < 60 | |
$secondes = 5; // les secondes < 60 | |
$annee = date("Y"); | |
$mois = date("m"); | |
$jour = date("d"); | |
// quand le compteur arrive à 0 | |
// -> redirection | |
//$redirection = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="demo"><a href='#' class='btn btn-lg btn-primary'>Je suis pas un robots</a></div> | |
<script> | |
document.getElementById('demo').onclick = function changeContent() { | |
document.getElementById('demo').innerHTML = "<input name='agree' id='agree' type='checkbox' /><label for='agree'>J accepte les Termes et Conditions</label> <a href='' rel='nofollow'>privacy policy</a><br><button type='submit' id='submit' value='submit' class='btn btn-primary btn-lg margehb25'>Envoyer</button>"; | |
function toggleSubmit() { | |
document.getElementById('submit').disabled = !document.getElementById('agree').checked; | |
} | |
document.getElementById('agree').onclick = toggleSubmit; | |
toggleSubmit(); | |
} |
OlderNewer