downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/fr/function.halt-compiler.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.misc.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'fr',
  ),
 
'this' =>
  array (
   
0 => 'function.halt-compiler.php',
   
1 => '__halt_compiler',
  ),
 
'up' =>
  array (
   
0 => 'ref.misc.php',
   
1 => 'Fonctions diverses',
  ),
 
'prev' =>
  array (
   
0 => 'function.get-browser.php',
   
1 => 'get_browser',
  ),
 
'next' =>
  array (
   
0 => 'function.highlight-file.php',
   
1 => 'highlight_file',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.halt-compiler" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">__halt_compiler</h1>
  <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">__halt_compiler</span> &mdash; <span class="dc-title">
   Stoppe l&#039;exécution du compilateur
  </span></p>

 </div>
 <a name="function.halt-compiler.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type"><span class="type void">void</span></span> <span class="methodname"><b>__halt_compiler</b></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   Stoppe l&#039;exécution du compilateur. Ceci peut être très utile
   pour embarquer des données dans des scripts PHP, comme des fichiers
   d&#039;installation.
  </p>
  <p class="para">
   L&#039;octet de la position du début des données peut être déterminé par la
   constante <b><tt class="constant">__COMPILER_HALT_OFFSET__</tt></b> qui n&#039;est définie
   que s&#039;il y a une fonction <b>__halt_compiler()</b> présente
   dans le fichier.
  </p>
 </div>


 <a name="function.halt-compiler.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Aucune valeur n&#039;est retournée.
  </p>
 </div>


 <a name="function.halt-compiler.examples"></a><div class="refsect1 examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   </p><div class="example">
    <p><b>Exemple #1 Exemple avec <b>__halt_compiler()</b></b></p>
    <div class="example-contents programlisting">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">//&nbsp;Ouverture&nbsp;d'un&nbsp;fichier<br /></span><span style="color: #0000BB">$fp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'r'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;Déplace&nbsp;le&nbsp;pointeur&nbsp;de&nbsp;fichier&nbsp;vers&nbsp;les&nbsp;données<br /></span><span style="color: #0000BB">fseek</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">__COMPILER_HALT_OFFSET__</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;Puis,&nbsp;on&nbsp;l'affiche<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">stream_get_contents</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">));<br /><br /></span><span style="color: #FF8000">//&nbsp;La&nbsp;fin&nbsp;de&nbsp;l'exécution&nbsp;du&nbsp;script<br /></span><span style="color: #007700">__halt_compiler();&nbsp;</span><span style="color: #0000BB">les&nbsp;données&nbsp;d</span><span style="color: #FF8000">'installation&nbsp;(eg.&nbsp;tar,&nbsp;gz,&nbsp;PHP,&nbsp;etc..)</span>
</span>
</code></div>
    </div>

   </div><p>
  </p>
 </div>


 <a name="function.halt-compiler.notes"></a><div class="refsect1 notes">
  <h3 class="title">Notes</h3>
  <blockquote><p><b class="note">Note</b>:
  
    <b>__halt_compiler()</b> ne peut être utilisé que
    depuis une portée extérieure.
   <br />
  </p></blockquote>
 </div>


</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites