mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Add missing PHP tags
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@278842 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
9a23e805f5
commit
32ed9bc683
6 changed files with 19 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.createdefaultstub">
|
||||
<refnamediv>
|
||||
<refname>Phar::createDefaultStub</refname>
|
||||
|
@ -71,12 +71,14 @@ php myphar.phar
|
|||
<title>A <function>Phar::createDefaultStub</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
try {
|
||||
$phar = new Phar('myphar.phar');
|
||||
$phar->setStub($phar->createDefaultStub('cli.php', 'web/index.php'));
|
||||
} catch (Exception $e) {
|
||||
// handle errors
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="phar.getstub">
|
||||
<refnamediv>
|
||||
<refname>Phar::getStub</refname>
|
||||
|
@ -55,6 +55,7 @@ php myphar.phar
|
|||
<title>A <function>Phar::getStub</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$p = new Phar('/path/to/my.phar', 0, 'my.phar');
|
||||
echo $p->getStub();
|
||||
echo "==NEXT==\n";
|
||||
|
@ -67,6 +68,7 @@ Phar::mapPhar('myphar.phar');
|
|||
include 'phar://myphar.phar/startup.php';
|
||||
__HALT_COMPILER(); ?>");
|
||||
echo $p->getStub();
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry xml:id="phar.setsignaturealgorithm" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>Phar::setSignatureAlgorithm</refname>
|
||||
|
@ -52,10 +52,12 @@
|
|||
OpenSSL key file:
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$private = openssl_get_privatekey(file_get_contents('private.pem'));
|
||||
$pkey = '';
|
||||
openssl_pkey_export($private, $pkey);
|
||||
$p->setSignatureAlgorithm(Phar::OPENSSL, $pkey);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
See <link linkend="phar.using">phar introduction</link> for instructions on
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<refentry xml:id="phar.webphar" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>Phar::webPhar</refname>
|
||||
|
@ -72,6 +72,7 @@
|
|||
these extensions are mapped to these mime types:
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$mimes = array(
|
||||
'phps' => 2, // pass to highlight_file()
|
||||
'c' => 'text/plain',
|
||||
|
@ -114,6 +115,7 @@ $mimes = array(
|
|||
'xbm' => 'image/xbm',
|
||||
'xml' => 'text/xml',
|
||||
);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
|
@ -127,9 +129,11 @@ $mimes = array(
|
|||
For example:
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
array(
|
||||
'myinfo' => 'myinfo.php'
|
||||
);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
would route calls to <literal>http://<host>/myphar.phar/myinfo</literal>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<section xml:id="phar.configuration" xmlns="http://docbook.org/ns/docbook">
|
||||
&reftitle.runtime;
|
||||
&extension.runtime;
|
||||
|
@ -149,7 +149,7 @@ include "phar://arch2/foo.php";
|
|||
traditional disk-based installation.
|
||||
<example>
|
||||
<title>phar.cache_list usage example</title>
|
||||
<programlisting role="php">
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
in php.ini (windows):
|
||||
phar.cache_list =C:\path\to\phar1.phar;C:\path\to\phar2.phar
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.15 $ -->
|
||||
<!-- $Revision: 1.16 $ -->
|
||||
<chapter xml:id="phar.using" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Using Phar Archives</title>
|
||||
|
||||
|
@ -129,9 +129,11 @@ try {
|
|||
as extracted using this code:
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$public = openssl_get_publickey(file_get_contents('private.pem'));
|
||||
$pkey = '';
|
||||
openssl_pkey_export($public, $pkey);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
must be saved adjacent to the phar archive it verifies. If the phar archive
|
||||
|
|
Loading…
Reference in a new issue