Phar::offsetSet

(PHP >= 5.3.0, PECL phar >= 1.0.0)

Phar::offsetSetmet le contenu d'un fichier interne à l'archive à l'identique du contenu d'un fichier externe

Description

public void Phar::offsetSet ( string $offset , string $value )

Note:

Cette méthode nécessite que la variable de configuration INI phar.readonly soit définie à 0 pour fonctionner avec les objets Phar. Sinon, une exception PharException sera lançée.

C'est une implémentation de l'interface ArrayAccess qui permet la manipulation directe du contenu d'une archive Phar en utilisant les crochets d'accès au tableau. offsetSet est utilisé pour modifier un fichier existant ou pour ajouter un nouveau fichier à l'archive Phar.

Liste de paramètres

offset

Le nom de fichier (en chemin relatif) à chercher dans le Phar.

value

Contenu du fichier.

Valeurs de retour

Aucune valeur de retour.

Erreurs / Exceptions

Si phar.readonly est à 1, une exception BadMethodCallException est levée, car modifier un Phar n'est permis que quand phar.readonly est à 0. Une exception PharException est levée s'il y a eu un problème lors de l'écryi? souuc que qne excepti s'il y a eu un problème/fr2.p$oid="refsect1-phar.offsetset-errors">

Erreuset-erroxceptions

/set-er-797e"> ng>:

s="methodpap <?ghp
$p param">sf="cl="scrnet/sf="cl="scrnet/ href=ram">sf="cl="scrnet/sf="cl="scrnet/sf="cl="scrnet/sf="cl="scrnet/0f=ram">sf="cl="scrnet/sf="cl="scrnet/sf="cl="scrnet/try {
    f=ram">sf="cl="scrnet/B span classbr />    f=ram">sf="cl="scrnet/$pf=ram">sf="cl="scrnet/sf="cl="scrnet/sf="cl="scrnet/sf="cl="scrnet/sf="cl="scrnet/} catch (f=ram">sf="cl="scrnet/l y a eu  $ef=ram">sf="cl="scrnet/    echo param">sf="cl="scrnet/sf="cl="scrnet/sf="cl="scrnet/$ef=ram">sf="cl="scrnet/}
param">sf="cl="scrnet/?ose" class=" class=" class="pa

Erreseealsooretour

savbar-searlp ti&#d'er un nouvf=ram">savbar-searlpsavbar-sev id="laasème/fr2.p$oiclass=" div class="pauserra">s1 class="refnamexed-> em&amiv c

s-add@2x.png'menu-'add;éra">'> '12'div id="'12'g>Phmmod>add;éra">f=rmmod>pulation dietour

CeThel>ivrif) useren utriburef=ra">sngua t men.

< clas>java ge-tools"> net/ meter">valuss=""> atab> istn'> HeeeeeeeeeePhar. Sinoa href="cmeter">valuss= istn'> ">valuss=valuss= ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss=$ons romSer">$ add>romSer">$php.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= romDbuold>romDHeeeeeeeeeeeeeeeeeeee">valuss= ">valuss= romItanual/">buold>romItanual/php.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= cHeeeeeeeeeeeeeeeeeeee">valuss= ">valuss= cHeeeeeeeeeeeeeeeeeeee">valuss= ">valuss= cHeeeeeeeeeeeeeeeeeeee">valuss= ">valuss= cHeeeeeeeeeeeeeeeeeeee">valuss= ">valuss=< <_​_​c<">_​_​cHeeeeeeeeeeeeeeeeeeee">valuss= ">valuss= cHeeeeeeeeeeeeeeeeeeee">valuss= ">valuss= cHeeeeeeeeeeeeeeeeeeee">valuss= ">valuss= cHeeeeeeeeeeeeeeeeeeee">valuss= ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss=decref='bophp.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss=decref='bo>Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= ">delMh=dphp.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= deletephp.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss=ta> tTo">extTophp.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= ">getMh=dphp.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= getMmis qudphp.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= getSign Tracphp.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= 'archivage et l s s php.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= sign Tracset l Sign Tracs Sign Tracsphp.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= ">hasMh=dphp.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= y a y a > y a >Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss=$ons $ $php.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss=. Sinonr"> ual/php.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss=. map/a>. Sinonr"> mapphp.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss=. mount Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss=< Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss=Focus > ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss=$ons $">runn">$php.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= divAliayphp.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= ">setMh=dphp.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= setSign TracAlgorithmphp.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss=$ons $ $php.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss=$ons $ $php.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss= uncHeeeeeeeeeeeeeeeeeeee">valuss= ">valuss=1 1<unm>1<Heeeeeeeeeeeeeeeeeeee">valuss= ">valuss=. Sinonr"> webphp.net/rep hreeeeeeeeeeeeeee//support">Heeeeeeeeeeeeeeeeeeeeee">valuss=valuss=Heeeeeeeeeeeeeeeeee">valuss=v label for="c/a> "/c "/my Myernate" ss="navbar-seaor="c/a> "/iontuc= SinoaC "/tionsselect> ernate" tyil/en/secuvbar-seaor="c/a> "/mid>
<<>Mid> tyil/en/secuvbar-seaor="c/a> "/privacy Privacy policyn/secuvbar-seaorv id="layoee"pa

lava Eclassal/dd> thirf='/mty librar hre net/ c="http://fr2.php.net/js/ext/html5.j//ajax.googleapi l'ar/ajaxuvbbs/jskey=/1.10.2/jskey=.minase href="http:c="http://fr2.php.net/js/ext/html5.js"> > hogan-2pan .minase href="http:c="http://fr2.php.net/js/ext/html5.js"> //fraxed-.minase href="http:c="http://fr2.php.net/js/ext/html5.js"> > se href="http:c="http://fr2.php.net/js/ext/html5.js"> Top/workaroet/js/ext/:; ef="clp"> TopHo svg" 0