This file contains hidden or 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 | |
class Person | |
{ | |
/** | |
* Eigenschaften | |
*/ | |
public string $name = ''; | |
public ?string $middleName = null; | |
public int $alter = 0; | |
public DateTime $geburtsdatum; |
This file contains hidden or 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
version: "3.1" | |
volumes: | |
dbdata: | |
services: | |
php-apache: | |
build: docker | |
container_name: php-apache-server | |
working_dir: /src |
This file contains hidden or 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 | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Console\Helper\ProgressBar; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
class RandomCommand extends Command{ | |
protected static $defaultName = 'test:show-random'; |
This file contains hidden or 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 | |
error_reporting(E_ALL); | |
ini_set('display_errors','On'); | |
class MysqlSessionHandler implements SessionHandlerInterface,SessionIdInterface{ | |
private PDO $pdo; | |
private PDOStatement $readStatement; | |
private PDOStatement $writeStatement; | |
public function __construct(PDO $pdo){ | |
$this->pdo = $pdo; | |
} |
This file contains hidden or 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 | |
if(isset($_COOKIE['Token'])){ | |
session_id($_COOKIE['Token']); //sette den token als ID | |
} | |
session_start(); //Lade session | |
$userAcces = $_SESSION['userAccess'];//wenn Token valide ist, stehen in $_SESSION daten drin | |
$responseArray = []; | |
$responseArray = array_merge($responseArray,[$_SERVER['REQUEST_METHOD']]); | |
$responseArray = array_merge($responseArray,$_GET); | |
$responseArray = array_merge($responseArray,$_POST); |
This file contains hidden or 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="de"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Gewinnspiel</title> | |
<style> | |
body{ | |
position: absolute; | |
top:0; | |
left:0; |
This file contains hidden or 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
<IfModule mod_rewrite.c> | |
<IfModule mod_negotiation.c> | |
Options -MultiViews | |
</IfModule> | |
Options +FollowSymlinks -Indexes | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME) !-d |
This file contains hidden or 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 | |
error_reporting(E_ALL); | |
ini_set('display_errors','On'); | |
require_once __DIR__.'/vendor/autoload.php'; | |
$imageBase64 = base64_encode(file_get_contents('https://placekitten.com/200/287')); | |
$transport = new Swift_SmtpTransport('smtp.gmail.com', 465,'ssl'); | |
$transport->setUsername('gmail adresse mit @gmail.com'); | |
$transport->setPassword('passwort aus APP Passwords'); |
This file contains hidden or 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
<form method="POST" action="upload.php" enctype="multipart/form-data"> | |
<input type="file" name="datei[]"> | |
<button type="submit">Upload</button> | |
</form> |
This file contains hidden or 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
document.addEventListener("DOMContentLoaded", function (event) { | |
let htmlRoot = document.querySelector('html'); | |
htmlRoot.classList.add('js'); | |
htmlRoot.classList.remove('no-js'); | |
let body = document.querySelector('body'); | |
body.addEventListener('click', function (event) { | |
if (event.target.getAttribute('data-confirm')) { |