Phar

Phar

Phar (PHP Archive) ist eine Erweiterung in PHP, die es ermöglicht, aus einer komprimierten Archivdatei heraus Programme oder Dateien zu verarbeiten, ähnlich Java Archive. Für die Komprimierung der Daten selbst stehen verschiedene Kompressionsverfahren wie z.B. bzip2, gzip oder auch ZIP zur Verfügung. Der Ursprung von Phar geht auf das PEAR-Paket PHP_Archive zurück. Später entstand daraus die Erweiterung, auf Basis der Bibliothek PECL, Phar. Seit der PHP-Version 5.3.0[1] ist Phar nativ in PHP implementiert.

Beispiel

Das gewöhnliche Einbinden von Dateien erfolgt über die Angabe von absolutem oder relativem Dateipfad. Wohingegen bei Phar-Dateien der sogenannte Stream Wrapper phar:// angegeben werden muss. Folglich wird die Datei nach dem Slash des Archivnamens eingebunden.

<?php
 
  // gewöhnliches Einbinden
  include '/path/to/external/file.php';
 
  // Einbinden über eine Archivdatei
  include 'phar:///path/to/myphar.phar/file.php';
 
?>

Weblinks

Einzelnachweise

  1. http://de.php.net/manual/de/migration53.new-extensions.php

Wikimedia Foundation.

Игры ⚽ Поможем решить контрольную работу

Schlagen Sie auch in anderen Wörterbüchern nach:

  • phar|i|sa|ic — «FAR uh SAY ihk», adjective. of or having to do with the Pharisees. ╂[< Late Latin Pharisaicus < Greek pharisaïkós] phar|i|sa|ic «FAR uh SAY ihk», adjective. 1. making an outward show of religion or morality without the real spirit. 2.… …   Useful english dictionary

  • Phar|i|sa|ic — «FAR uh SAY ihk», adjective. of or having to do with the Pharisees. ╂[< Late Latin Pharisaicus < Greek pharisaïkós] phar|i|sa|ic «FAR uh SAY ihk», adjective. 1. making an outward show of religion or morality without the real spirit. 2.… …   Useful english dictionary

  • phar|ma|co|pe|ia — phar|ma|co|poe|ia or phar|ma|co|pe|ia «FAHR muh kuh PEE uh», noun, plural ias. 1. a book containing an official list and description of drugs and medicines. 2. a stock or collection of drugs, chemicals, medicines, or remedies. ╂[< New Latin… …   Useful english dictionary

  • Phar.B. — Phar.B. Abreviatura de Bachelor of Pharmacy. Diccionario Mosby Medicina, Enfermería y Ciencias de la Salud, Ediciones Hancourt, S.A. 1999 …   Diccionario médico

  • Phar.D. — Phar.D. En inglés, abreviatura de Doctor en Farmacia (Doctor of Pharmacy). Diccionario Mosby Medicina, Enfermería y Ciencias de la Salud, Ediciones Hancourt, S.A. 1999 …   Diccionario médico

  • phar — abbrev. 1. pharmaceutical 2. pharmacist 3. pharmacy * * * …   Universalium

  • Phar. D. — Phar. D. abbr doctor of pharmacy …   Medical dictionary

  • phar — abbrev. 1. pharmaceutical 2. pharmacist 3. pharmacy …   English World dictionary

  • Phar|a|on|ic — «FAIR ee ON ihk», adjective. 1. of or having to do with a Pharaoh or the Pharaohs. 2. like or characteristic of a Pharaoh or the Pharaohs …   Useful english dictionary

  • phar|ma|cy — «FAHR muh see», noun, plural cies. 1. a place where drugs and medicines are prepared or sold; drugstore. 2. the preparation and dispensing of drugs and medicines; pharmaceutics. 3. = pharmacopoeia (def. 2). (Cf. ↑pharmacopoeia) ╂[Middle English… …   Useful english dictionary

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”