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
#!/usr/bin/python | |
# | |
# Made by [email protected] | |
# Version: 1.2.1 | |
# | |
''' | |
An Epitech norme checker | |
Usage: python norme.py <files to scan> [-nocheat] [-verbose] [-score] [-libc] |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<meta name="description" content=""> | |
<meta name="author" content=""> |
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 | |
/* | |
* Open example.json file, | |
* parse it into a $json array | |
*/ | |
$string = file_get_contents("example.json", FILE_USE_INCLUDE_PATH); | |
$json = json_decode($string, true); |
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 | |
// version 1 of class Pokemon | |
class Pokemon { | |
public $name; | |
public $level; | |
public $pv; | |
public function attack($name) { |
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 | |
$name = "Bob"; | |
echo $name; | |
// VS // | |
echo "Bob"; | |
// ---------------------------- // |
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 | |
// Connexion à la base de données | |
try { | |
$bdd = new PDO('mysql:host=localhost;dbname=mysql;charset=utf8', 'root', 'simplonco'); | |
} catch(Exception $e) { | |
die('Erreur : '.$e->getMessage()); | |
} | |
// Execution d'une requête SQL | |
$reponse = $bdd->query('SHOW DATABASES;'); |
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 phpinfo(); ?> |
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
{ | |
"books": { | |
"programming": [{ | |
"name": "Apprendre à coder en PHP", | |
"price": 26.00, | |
"author": "Matthieu Nebra" | |
}, { | |
"name": "Learn you a Haskell", | |
"price": 0.00, | |
"author": "Miron Lipovaca" |
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
<books> | |
<programming> | |
<book> | |
<name>Apprendre à coder en PHP</name> | |
<price>26.00</price> | |
<author>Matthieu Nebra</author> | |
</book> | |
<book> | |
<name>Learn you a Haskell</name> | |
<price>0.00</price> |
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
<a href="mailto:[email protected]">Contact me</a> |
OlderNewer