:: Anbieterverzeichnis :: Globale Branchen
:: SELFPHP Forum ::
Fragen rund um die Themen PHP?
In ?ber
130.000 Beitr?gen finden Sie sicher die passende
Antwort! 
:: Newsletter ::
Abonnieren Sie hier den kostenlosen
SELFPHP Newsletter!
|
|
hash_update_file  |
|
Befehl | Version | Beschreibung | Beispiel 1 - ohne die Nutzung von hash_update_file() | Ausgabe | Beispiel 2 - mit der Nutzung von hash_update_file() | Ausgabe | Download |
SELFPHP ist Shopware Solution Partner
Shopware ist ein vielfach ausgezeichnetes Onlineshop-System der shopware AG, das auf PHP. Zend Framework und SQL basiert.
SELFPHP unterstützt Sie als Shopware Solution Partner bei der Konzeption, Programmierung und Realisierung Ihres Onlineshops und passt Shopware bei Bedarf an Ihre Unternehmensbedürfnisse an.
Weitere Informationen
Befehl
bool hash_update_file ( resource $context , string $filename [, resource $context = NULL ] ) |
Version
(PHP 5 >= 5.1.2, PECL hash >= 1.1) |
Beschreibung
Warning: include_once(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /var/www/html/_includeSELFPHP/funktionsreferenz.inc.php on line 405
Warning: include_once(http://geoserver.selfphp.com/million-dollar.php?remote_address=172.17.0.1): failed to open stream: no suitable wrapper could be found in /var/www/html/_includeSELFPHP/funktionsreferenz.inc.php on line 405
Warning: include_once(): Failed opening 'http://geoserver.selfphp.com/million-dollar.php?remote_address=172.17.0.1' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/_includeSELFPHP/funktionsreferenz.inc.php on line 405
Mit hash_update_file() können Daten aus einer Datei an einen aktiven Hash-Kontext angefügt werden.
Als Rückgabewert erhalten Sie den Wert true im Erfolgsfall, ansonsten false.
- $context
Ein Hashing-Kontext, der von hash_init() zurückgegeben wurde.
- $filename
URL oder Pfad der Datei. fopen-Wrapper werden von der Funktion unterstützt.
- $context
Ein Stream-Kontext, der von stream_context_create() zurückgegeben wurde.
|
Beispiel 1 - ohne die Nutzung von hash_update_file()
<?PHP
$var = hash_init('sha256');
hash_update($var, 'Interessante Code Snippets finden Sie auf ');
file_put_contents('inhalt.txt', 'SELFPHP im Bereich PHP Code Snippets.');
echo hash_final($var);
?>
|
Ausgabe
4fe04eca0ddb6f23e1b04fc21cda3440082c12c5342ec865ce6804c27146a2f1
|
Beispiel 2 - mit der Nutzung von hash_update_file()
<?PHP
$var = hash_init('sha256');
hash_update($var, 'Interessante Code Snippets finden Sie auf ');
file_put_contents('inhalt.txt', 'SELFPHP im Bereich PHP Code Snippets.');
hash_update_file($var, 'inhalt.txt');
echo hash_final($var);
?>
|
Ausgabe
9e5107584e8621ed11be0c8a9caa714122df09fc5c054e26672401d4712cb971
|
|
|
|
|
|


|