<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="sv">
	<id>https://wiki.linux.se/index.php?action=history&amp;feed=atom&amp;title=Using_Phar_Archives%3A_the_phar_stream_wrapper</id>
	<title>Using Phar Archives: the phar stream wrapper - Versionshistorik</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.linux.se/index.php?action=history&amp;feed=atom&amp;title=Using_Phar_Archives%3A_the_phar_stream_wrapper"/>
	<link rel="alternate" type="text/html" href="https://wiki.linux.se/index.php?title=Using_Phar_Archives:_the_phar_stream_wrapper&amp;action=history"/>
	<updated>2026-04-28T19:01:11Z</updated>
	<subtitle>Versionshistorik för denna sida på wikin</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://wiki.linux.se/index.php?title=Using_Phar_Archives:_the_phar_stream_wrapper&amp;diff=6021&amp;oldid=prev</id>
		<title>Admin: /* Använda Phar-arkiv: phar stream wrapper */</title>
		<link rel="alternate" type="text/html" href="https://wiki.linux.se/index.php?title=Using_Phar_Archives:_the_phar_stream_wrapper&amp;diff=6021&amp;oldid=prev"/>
		<updated>2024-11-12T17:53:43Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Använda Phar-arkiv: phar stream wrapper&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;sv&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Äldre version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versionen från 12 november 2024 kl. 17.53&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Rad 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Rad 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Använda Phar-arkiv: phar stream wrapper ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Använda Phar-arkiv: phar stream wrapper ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Phar stream wrapper stödjer fullständigt följande operationer:  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Phar stream wrapper stödjer fullständigt följande operationer:  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*fopen() för läsning och skrivning (dock ej append)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/ins&gt;fopen()&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] &lt;/ins&gt;för läsning och skrivning (dock ej append)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*unlink()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/ins&gt;unlink()&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*stat(), fstat()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/ins&gt;stat()&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/ins&gt;fstat()&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*fseek()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/ins&gt;fseek()&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*rename()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/ins&gt;rename()&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*katalogoperationer som opendir(), rmdir() och mkdir().&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*katalogoperationer som &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/ins&gt;opendir()&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/ins&gt;rmdir()&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] &lt;/ins&gt;och &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/ins&gt;mkdir()&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Enskild filkomprimering och metadata per fil kan också manipuleras i ett Phar-arkiv med hjälp av stream contexts:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Enskild filkomprimering och metadata per fil kan också manipuleras i ett Phar-arkiv med hjälp av stream contexts:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.linux.se/index.php?title=Using_Phar_Archives:_the_phar_stream_wrapper&amp;diff=6020&amp;oldid=prev</id>
		<title>Admin: Skapade sidan med &#039;== Använda Phar-arkiv: phar stream wrapper == Phar stream wrapper stödjer fullständigt följande operationer:  *fopen() för läsning och skrivning (dock ej append) *unlink() *stat(), fstat() *fseek() *rename() *katalogoperationer som opendir(), rmdir() och mkdir().  Enskild filkomprimering och metadata per fil kan också manipuleras i ett Phar-arkiv med hjälp av stream contexts:   &lt;pre&gt; &lt;?php $context = stream_context_create(array(&#039;phar&#039; =&gt; array(&#039;compress&#039; =&gt; Phar:...&#039;</title>
		<link rel="alternate" type="text/html" href="https://wiki.linux.se/index.php?title=Using_Phar_Archives:_the_phar_stream_wrapper&amp;diff=6020&amp;oldid=prev"/>
		<updated>2024-11-12T17:52:04Z</updated>

		<summary type="html">&lt;p&gt;Skapade sidan med &amp;#039;== Använda Phar-arkiv: phar stream wrapper == Phar stream wrapper stödjer fullständigt följande operationer:  *fopen() för läsning och skrivning (dock ej append) *unlink() *stat(), fstat() *fseek() *rename() *katalogoperationer som opendir(), rmdir() och mkdir().  Enskild filkomprimering och metadata per fil kan också manipuleras i ett Phar-arkiv med hjälp av stream contexts:   &amp;lt;pre&amp;gt; &amp;lt;?php $context = stream_context_create(array(&amp;#039;phar&amp;#039; =&amp;gt; array(&amp;#039;compress&amp;#039; =&amp;gt; Phar:...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Ny sida&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Använda Phar-arkiv: phar stream wrapper ==&lt;br /&gt;
Phar stream wrapper stödjer fullständigt följande operationer: &lt;br /&gt;
*fopen() för läsning och skrivning (dock ej append)&lt;br /&gt;
*unlink()&lt;br /&gt;
*stat(), fstat()&lt;br /&gt;
*fseek()&lt;br /&gt;
*rename()&lt;br /&gt;
*katalogoperationer som opendir(), rmdir() och mkdir().&lt;br /&gt;
&lt;br /&gt;
Enskild filkomprimering och metadata per fil kan också manipuleras i ett Phar-arkiv med hjälp av stream contexts:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$context = stream_context_create(array(&amp;#039;phar&amp;#039; =&amp;gt; array(&amp;#039;compress&amp;#039; =&amp;gt; Phar::GZ)),&lt;br /&gt;
                                 array(&amp;#039;metadata&amp;#039; =&amp;gt; array(&amp;#039;user&amp;#039; =&amp;gt; &amp;#039;cellog&amp;#039;)));&lt;br /&gt;
file_put_contents(&amp;#039;phar://my.phar/somefile.php&amp;#039;, 0, $context);&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stream wrappern fungerar inte med fjärrfiler och kan inte användas på fjärrfiler. Därför är den tillåten även när PHP-konfigurationerna allow_url_fopen och allow_url_include är inaktiverade.&lt;br /&gt;
&lt;br /&gt;
Även om det är möjligt att skapa Phar-arkiv från grunden enbart med hjälp av stream-operationer, är det bäst att använda funktionaliteten som är inbyggd i [[Phar]]-klassen. Stream wrappern är mest lämpad för skrivskyddade operationer.&lt;br /&gt;
&lt;br /&gt;
= Sidslut =&lt;br /&gt;
&lt;br /&gt;
Orginalhemsidan på Engelska :https://www.php.net/manual/en/phar.using.stream.php&lt;br /&gt;
&amp;lt;BR&amp;gt;[[PHP]]&lt;br /&gt;
[[Funktioner]]&lt;br /&gt;
[[Funktionsreferens]]&lt;br /&gt;
[[Komprimerings- och arkivtillägg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HR&amp;gt;&lt;br /&gt;
Det här är en maskinöversättning av PHP-manualen till svenska. Om du hittar fel är vi tacksamma om du rapporterar dem via formuläret som finns på &lt;br /&gt;
https://www.linux.se/kontaka-linux-se/&lt;br /&gt;
&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;Tack till [https://www.Datorhjalp.se Datorhjälp Stockholm] som har  sponsrat [https://www.linux.se Linux.se] med webbhotell.&lt;br /&gt;
&lt;br /&gt;
[[Kategori:Php]]&lt;br /&gt;
[[Kategori:Komprimerings- och Arkivtillägg]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>