php
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| php [2024-02-27 14:07:04] – [allgemeines zur Ausgabe] manfred | php [2024-10-14 11:38:17] (aktuell) – [Lösung] manfred | ||
|---|---|---|---|
| Zeile 597: | Zeile 597: | ||
| === PDO === | === PDO === | ||
| + | |||
| + | Die Option '' | ||
| + | Ihr ist es scheißegal ob sie auf " | ||
| * [[http:// | * [[http:// | ||
| Zeile 699: | Zeile 702: | ||
| PDO:: | PDO:: | ||
| PDO:: | PDO:: | ||
| - | PDO:: | ||
| PDO:: | PDO:: | ||
| ); | ); | ||
| Zeile 1452: | Zeile 1454: | ||
| $pool_lun_snap_name = trim(substr($neuer_string, | $pool_lun_snap_name = trim(substr($neuer_string, | ||
| echo $pool_lun_snap_name; | echo $pool_lun_snap_name; | ||
| + | |||
| + | |||
| + | wir wollen die 3 Zeichen " | ||
| + | $string_pos = strpos($datensatz, | ||
| + | $gesuchter_string = trim(substr($datensatz, | ||
| + | bei "... xyz:abc defg: ..." ist die Zeichenkette " | ||
| Zeile 1538: | Zeile 1546: | ||
| > php / | > php / | ||
| - | > ls -lha Ausgabe.txt | + | > ls -lha verschluesselt.txt |
| - | -rw-rw-r-- 1 fritz fritz 684 Jun 9 17:03 Ausgabe.txt | + | -rw-rw-r-- 1 fritz fritz 684 Jun 9 17:03 verschluesselt.txt |
| | | ||
| > php / | > php / | ||
| Hallo Welt! | Hallo Welt! | ||
| + | |||
| + | //In diesem Beispiel wird, mit dem ersten Aufruf, die Zeichenkette "'' | ||
| + | Und mit dem zweiten Aufruf wird der Inhalt der Datei wieder entschlüsselt und ausgegeben.// | ||
| <file php php_openssl_verschl.php> | <file php php_openssl_verschl.php> | ||
| Zeile 1548: | Zeile 1559: | ||
| openssl_public_encrypt(" | openssl_public_encrypt(" | ||
| - | $dateihandle = fopen(" | + | $dateihandle = fopen(" |
| $b64crypt = base64_encode(" | $b64crypt = base64_encode(" | ||
| Zeile 1558: | Zeile 1569: | ||
| <file php php_openssl_entschl.php> | <file php php_openssl_entschl.php> | ||
| <?php | <?php | ||
| - | $crypttext=base64_decode(trim(file_get_contents(" | + | $crypttext=base64_decode(trim(file_get_contents(" |
| openssl_private_decrypt(" | openssl_private_decrypt(" | ||
| Zeile 1569: | Zeile 1580: | ||
| ==== Ein- und Ausgabe soll über jeweils eine Datei laufen ==== | ==== Ein- und Ausgabe soll über jeweils eine Datei laufen ==== | ||
| - | > echo "Hallo Welt!" > entschlüsselt.txt | + | > echo "Hallo Welt!" > entschluesselt.txt |
| > php / | > php / | ||
| - | > ls -lha verschlüsselt.txt | + | > ls -lha verschluesselt.txt |
| - | -rw-rw-r-- 1 fritz fritz 684 Jun 9 17:24 verschlüsselt.txt | + | -rw-rw-r-- 1 fritz fritz 684 Jun 9 17:24 verschluesselt.txt |
| | | ||
| - | > rm entschlüsselt.txt | + | > rm entschluesselt.txt |
| > php / | > php / | ||
| | | ||
| - | > cat entschlüsselt.txt ; echo | + | > cat entschluesselt.txt ; echo |
| Hallo Welt! | Hallo Welt! | ||
| <file php php_openssl_verschl.php> | <file php php_openssl_verschl.php> | ||
| <?php | <?php | ||
| - | openssl_public_encrypt(trim(file_get_contents(" | + | openssl_public_encrypt(trim(file_get_contents(" |
| - | $dateihandle = fopen(" | + | $dateihandle = fopen(" |
| $b64crypt = base64_encode(" | $b64crypt = base64_encode(" | ||
| Zeile 1594: | Zeile 1605: | ||
| <file php php_openssl_entschl.php> | <file php php_openssl_entschl.php> | ||
| <?php | <?php | ||
| - | $crypttext=base64_decode(trim(file_get_contents(" | + | $crypttext=base64_decode(trim(file_get_contents(" |
| openssl_private_decrypt(" | openssl_private_decrypt(" | ||
| - | $dateihandle = fopen(" | + | $dateihandle = fopen(" |
| fwrite($dateihandle, | fwrite($dateihandle, | ||
/home/http/wiki/data/attic/php.1709042824.txt · Zuletzt geändert: von manfred
