<?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=%2Frar%2F%2F</id>
	<title>/rar// - Versionshistorik</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.linux.se/index.php?action=history&amp;feed=atom&amp;title=%2Frar%2F%2F"/>
	<link rel="alternate" type="text/html" href="https://wiki.linux.se/index.php?title=/rar//&amp;action=history"/>
	<updated>2026-04-28T22:51:05Z</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=/rar//&amp;diff=3772&amp;oldid=prev</id>
		<title>Admin: /* Alternativ */</title>
		<link rel="alternate" type="text/html" href="https://wiki.linux.se/index.php?title=/rar//&amp;diff=3772&amp;oldid=prev"/>
		<updated>2024-09-01T05:18:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Alternativ&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 1 september 2024 kl. 05.18&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-l18&quot;&gt;Rad 18:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Rad 18:&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;=== Alternativ ===&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;=== Alternativ ===&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;{| class=&amp;quot;wikitable&amp;quot;&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;{| class=&amp;quot;wikitable&amp;quot;&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;! Omslagsöversikt&lt;/del&gt;&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;Attribut !! Stöds&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;! &lt;/del&gt;Attribut !! Stöds&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;|-&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;|-&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;| Begränsad av allow_url_fopen || Nej&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;| Begränsad av allow_url_fopen || Nej&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=/rar//&amp;diff=3771&amp;oldid=prev</id>
		<title>Admin den 1 september 2024 kl. 05.17</title>
		<link rel="alternate" type="text/html" href="https://wiki.linux.se/index.php?title=/rar//&amp;diff=3771&amp;oldid=prev"/>
		<updated>2024-09-01T05:17:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://wiki.linux.se/index.php?title=/rar//&amp;amp;diff=3771&amp;amp;oldid=3770&quot;&gt;Visa ändringar&lt;/a&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://wiki.linux.se/index.php?title=/rar//&amp;diff=3770&amp;oldid=prev</id>
		<title>Admin: Skapade sidan med &#039;rar:// rar:// — RAR  Description ¶ The wrapper takes the url encoded path to the RAR archive (relative or absolute), an optional asterisk (*), an optional number sign (#) and an optional url encoded entry name, as stored in the archive. Specifying an entry name requires the number sign; a leading forward slash in the entry name is optional.  This wrapper can open both files and directories. When opening directories, the asterisk sign forces the directory entries names...&#039;</title>
		<link rel="alternate" type="text/html" href="https://wiki.linux.se/index.php?title=/rar//&amp;diff=3770&amp;oldid=prev"/>
		<updated>2024-09-01T05:16:45Z</updated>

		<summary type="html">&lt;p&gt;Skapade sidan med &amp;#039;rar:// rar:// — RAR  Description ¶ The wrapper takes the url encoded path to the RAR archive (relative or absolute), an optional asterisk (*), an optional number sign (#) and an optional url encoded entry name, as stored in the archive. Specifying an entry name requires the number sign; a leading forward slash in the entry name is optional.  This wrapper can open both files and directories. When opening directories, the asterisk sign forces the directory entries names...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Ny sida&lt;/b&gt;&lt;/p&gt;&lt;div&gt;rar://&lt;br /&gt;
rar:// — RAR&lt;br /&gt;
&lt;br /&gt;
Description ¶&lt;br /&gt;
The wrapper takes the url encoded path to the RAR archive (relative or absolute), an optional asterisk (*), an optional number sign (#) and an optional url encoded entry name, as stored in the archive. Specifying an entry name requires the number sign; a leading forward slash in the entry name is optional.&lt;br /&gt;
&lt;br /&gt;
This wrapper can open both files and directories. When opening directories, the asterisk sign forces the directory entries names to be returned unencoded. If it&amp;#039;s not specified, they will be returned url encoded – the reason for this is to allow the wrapper to be correctly used with built-in functionality like the RecursiveDirectoryIterator in the presence of file names that seem like url encoded data.&lt;br /&gt;
&lt;br /&gt;
If the pound sign and the entry name part are not included, the root of the archive will be displayed. This differs from regular directories in that the resulting stream will not contain information such as the modification time, as the root directory is not stored in an individual entry in the archive. The usage of the wrapper with RecursiveDirectoryIterator requires the number sign to be included in the URL when accessing the root, so that the URLs of the children may be constructed correctly.&lt;br /&gt;
&lt;br /&gt;
Note: This wrapper is not enabled by default&lt;br /&gt;
In order to use the rar:// wrapper, the » rar extension available from » PECL must be installed.&lt;br /&gt;
&lt;br /&gt;
rar:// Available since PECL rar 3.0.0&lt;br /&gt;
&lt;br /&gt;
Usage ¶&lt;br /&gt;
rar://&amp;lt;url encoded archive name&amp;gt;[*][#[&amp;lt;url encoded entry name&amp;gt;]]&lt;br /&gt;
Options ¶&lt;br /&gt;
Wrapper Summary&lt;br /&gt;
Attribute	Supported&lt;br /&gt;
Restricted by allow_url_fopen	No&lt;br /&gt;
Restricted by allow_url_include	No&lt;br /&gt;
Allows Reading	Yes&lt;br /&gt;
Allows Writing	No&lt;br /&gt;
Allows Appending	No&lt;br /&gt;
Allows Simultaneous Reading and Writing	No&lt;br /&gt;
Supports stat()	Yes&lt;br /&gt;
Supports unlink()	No&lt;br /&gt;
Supports rename()	No&lt;br /&gt;
Supports mkdir()	No&lt;br /&gt;
Supports rmdir()	No&lt;br /&gt;
Context options&lt;br /&gt;
Name	Usage	Default&lt;br /&gt;
open_password	The password used to encrypt the headers of the archive, if any. WinRAR will encrypt all the files with the same password as the headers password when the later is present, so for archives with encrypted headers, file_password will be ignored.	 &lt;br /&gt;
file_password	The password used to encrypt a file, if any. If the headers are also encrypted, this option will be ignored in favor of open_password. The reason there are two options is to cover the possibility of supporting archives with different headers and file passwords, should those archives arise. Note that if the archive does not have its headers encrypted, open_password will be ignored and this option must be used instead.	 &lt;br /&gt;
volume_callback	A callback to determine the path of missing volumes. See RarArchive::open() for more information.	 &lt;br /&gt;
Examples ¶&lt;br /&gt;
Example #1 Traversing a RAR archive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
class MyRecDirIt extends RecursiveDirectoryIterator {&lt;br /&gt;
    function current() {&lt;br /&gt;
        return rawurldecode($this-&amp;gt;getSubPathName()) .&lt;br /&gt;
            (is_dir(parent::current())?&amp;quot; [DIR]&amp;quot;:&amp;quot;&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$f = &amp;quot;rar://&amp;quot; . rawurlencode(dirname(__FILE__)) .&lt;br /&gt;
    DIRECTORY_SEPARATOR . &amp;#039;dirs_and_extra_headers.rar#&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
$it = new RecursiveTreeIterator(new MyRecDirIt($f));&lt;br /&gt;
&lt;br /&gt;
foreach ($it as $s) {&lt;br /&gt;
    echo $s, &amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
The above example will output something similar to:&lt;br /&gt;
&lt;br /&gt;
|-allow_everyone_ni [DIR]&lt;br /&gt;
|-file1.txt&lt;br /&gt;
|-file2_אּ.txt&lt;br /&gt;
|-with_streams.txt&lt;br /&gt;
\-אּ [DIR]&lt;br /&gt;
  |-אּ\%2Fempty%2E [DIR]&lt;br /&gt;
  | \-אּ\%2Fempty%2E\file7.txt&lt;br /&gt;
  |-אּ\empty [DIR]&lt;br /&gt;
  |-אּ\file3.txt&lt;br /&gt;
  |-אּ\file4_אּ.txt&lt;br /&gt;
  \-אּ\אּ_2 [DIR]&lt;br /&gt;
    |-אּ\אּ_2\file5.txt&lt;br /&gt;
    \-אּ\אּ_2\file6_אּ.txt&lt;br /&gt;
Example #2 Opening an encrypted file (header encryption)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$stream = fopen(&amp;quot;rar://&amp;quot; .&lt;br /&gt;
    rawurlencode(dirname(__FILE__)) . DIRECTORY_SEPARATOR .&lt;br /&gt;
    &amp;#039;encrypted_headers.rar&amp;#039; . &amp;#039;#encfile1.txt&amp;#039;, &amp;quot;r&amp;quot;, false,&lt;br /&gt;
    stream_context_create(&lt;br /&gt;
        array(&lt;br /&gt;
            &amp;#039;rar&amp;#039; =&amp;gt;&lt;br /&gt;
                array(&lt;br /&gt;
                    &amp;#039;open_password&amp;#039; =&amp;gt; &amp;#039;samplepassword&amp;#039;&lt;br /&gt;
                )&lt;br /&gt;
            )&lt;br /&gt;
        )&lt;br /&gt;
    );&lt;br /&gt;
var_dump(stream_get_contents($stream));&lt;br /&gt;
/* creation and last access date is opt-in in WinRAR, hence most&lt;br /&gt;
 * files don&amp;#039;t have them */&lt;br /&gt;
var_dump(fstat($stream));&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
The above example will output something similar to:&lt;br /&gt;
&lt;br /&gt;
string(26) &amp;quot;Encrypted file 1 contents.&amp;quot;&lt;br /&gt;
Array&lt;br /&gt;
(&lt;br /&gt;
    [0] =&amp;gt; 0&lt;br /&gt;
    [1] =&amp;gt; 0&lt;br /&gt;
    [2] =&amp;gt; 33206&lt;br /&gt;
    [3] =&amp;gt; 1&lt;br /&gt;
    [4] =&amp;gt; 0&lt;br /&gt;
    [5] =&amp;gt; 0&lt;br /&gt;
    [6] =&amp;gt; 0&lt;br /&gt;
    [7] =&amp;gt; 26&lt;br /&gt;
    [8] =&amp;gt; 0&lt;br /&gt;
    [9] =&amp;gt; 1259550052&lt;br /&gt;
    [10] =&amp;gt; 0&lt;br /&gt;
    [11] =&amp;gt; -1&lt;br /&gt;
    [12] =&amp;gt; -1&lt;br /&gt;
    [dev] =&amp;gt; 0&lt;br /&gt;
    [ino] =&amp;gt; 0&lt;br /&gt;
    [mode] =&amp;gt; 33206&lt;br /&gt;
    [nlink] =&amp;gt; 1&lt;br /&gt;
    [uid] =&amp;gt; 0&lt;br /&gt;
    [gid] =&amp;gt; 0&lt;br /&gt;
    [rdev] =&amp;gt; 0&lt;br /&gt;
    [size] =&amp;gt; 26&lt;br /&gt;
    [atime] =&amp;gt; 0&lt;br /&gt;
    [mtime] =&amp;gt; 1259550052&lt;br /&gt;
    [ctime] =&amp;gt; 0&lt;br /&gt;
    [blksize] =&amp;gt; -1&lt;br /&gt;
    [blocks] =&amp;gt; -1&lt;br /&gt;
)&lt;br /&gt;
= Sidslut =&lt;br /&gt;
Orginalhemsidan på Engelska :https://www.php.net/manual/en/wrappers.rar.php&lt;br /&gt;
&amp;lt;BR&amp;gt;[[PHP]]&amp;lt;BR&amp;gt;[[Språkreferens]]&lt;br /&gt;
&amp;lt;BR&amp;gt;[[Stödda Protokoll och Inslagningar]]&amp;lt;BR&amp;gt;&lt;br /&gt;
[[Kategori:Php]]&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://datorhjalp.se Datorhjälp] som har  sponsrat Linux.se med webserver.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>