Date: 10/10/00
- Next message: Derick Rethans: "[PHP-DOC] cvs: phpdoc /nl Translators bookinfo.xml preface.xml /nl/appendices history.xml http-stuff.xml regexp.xml"
- Previous message: Derick Rethans: "Re: [PHP-DOC] cvs: phpdoc / lang-nl.ent manual.xml.in /nl bookinfo.xml chapters.ent preface.xml /nl/appendices debugger.xml escaping.xml history.xml http-stuff.xml migration.xml phpdevel.xml regexp.xml /nl/chapters config.xml copyright.xml install.xml intro.xml security.xml /nl/features connection-handling.xml cookies.xml error-handling.xml file-upload.xml http-auth.xml images.xml persistent-connections.xml remote-files.xml /nl/functions apache.xml array.xml aspell.xml bc.xml calendar.xml ccvs.xml classobj.xml com.xml cpdf.xml curl.xml cybercash.xml datetime.xml dba.xml dbase.xml dbm.xml dir.xml dl.xml domxml.xml errorfunc.xml exec.xml fdf.xml filepro.xml filesystem.xml ftp.xml funchand.xml gettext.xml http.xml hw.xml ibase.xml icap.xml ifx.xml image.xml imap.xml info.xml ldap.xml mail.xml math.xml mcal.xml mcrypt.xml mhash.xml misc.xml msql.xml mssql.xml mysql.xml network.xml nis.xml oci8.xml oracle.xml outcontrol.xml pcre.xml pdf.xml pfpro.xml pgsql.xml posix.xml pspell.xml readline.xml recode.xml regex.xml satellite.xml sem.xml session.xml shmop.xml snmp.xml sockets.xml strings.xml swf.xml sybase.xml uodbc.xml url.xml var.xml vmailmgr.xml wddx.xml xml.xml yaz.xml zlib.xml /nl/language basic-syntax.xml constants.xml control-structures.xml expressions.xml functions.xml oop.xml operators.xml references.xml types.xml variables.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
eschmid Tue Oct 10 15:45:33 2000 EDT
Added files:
/phpdoc/de/functions shmop.xml
Modified files:
/phpdoc manual.xml.in
/phpdoc/de chapters.ent
Log:
Hopefully the German docs will be now uptodate.
Index: phpdoc/manual.xml.in
diff -u phpdoc/manual.xml.in:1.32 phpdoc/manual.xml.in:1.33
--- phpdoc/manual.xml.in:1.32 Tue Oct 10 15:07:52 2000
+++ phpdoc/manual.xml.in Tue Oct 10 15:45:27 2000
@@ -7,6 +7,7 @@
<!ENTITY % lang-de "IGNORE">
<!ENTITY % lang-hu "IGNORE">
<!ENTITY % lang-it "IGNORE">
+<!ENTITY % lang-nl "IGNORE">
<!ENTITY % lang-ja "IGNORE">
<!ENTITY % lang-pt-BR "IGNORE">
<!ENTITY % lang-es "IGNORE">
@@ -25,6 +26,10 @@
<![%lang-it;[
<!ENTITY % language-defs SYSTEM "lang-it.ent">
+]]>
+
+<![%lang-nl;[
+<!ENTITY % language-defs SYSTEM "lang-nl.ent">
]]>
<![%lang-ja;[
Index: phpdoc/de/chapters.ent
diff -u phpdoc/de/chapters.ent:1.16 phpdoc/de/chapters.ent:1.17
--- phpdoc/de/chapters.ent:1.16 Fri Sep 8 13:02:12 2000
+++ phpdoc/de/chapters.ent Tue Oct 10 15:45:27 2000
@@ -88,6 +88,7 @@
<!ENTITY reference.satellite SYSTEM "functions/satellite.xml">
<!ENTITY reference.sem SYSTEM "functions/sem.xml">
<!ENTITY reference.session SYSTEM "functions/session.xml">
+<!ENTITY reference.shmop SYSTEM "functions/shmop.xml">
<!ENTITY reference.snmp SYSTEM "functions/snmp.xml">
<!ENTITY reference.sockets SYSTEM "functions/sockets.xml">
<!ENTITY reference.strings SYSTEM "functions/strings.xml">
Index: phpdoc/de/functions/shmop.xml
+++ phpdoc/de/functions/shmop.xml
<reference id="ref.shmop">
<title>Shared Memory Functions</title>
<titleabbrev>shmop</titleabbrev>
<partintro>
<para>
Shmop is an easy to use set of functions that allows php to read,
write, create and delete UNIX shared memory segments. The functions
will not work on windows, as it does not support shared memory. To
use shmop you will need to compile php with the --enable-shmop parameter
in your configure line.
</para>
<para>
<example>
<title>Shared Memory Operations Overview</title>
<programlisting role="php">
<?php
// Create 100 byte shared memory block with system id if 0xff3
$shm_id = shm_open(0xff3, "c", 0644, 100);
if(!$shm_id) {
echo "Couldn't create shared memory segment\n";
}
// Get shared memory block's size
$shm_size = shm_size($shm_id);
echo "SHM Block Size: ".$shm_size. " has been created.\n";
// Lets write a test string into shared memory
$shm_bytes_written = shm_write($shm_id, "my shared memory block", 0);
if($shm_bytes_written != strlen("my shared memory block")) {
echo "Couldn't write the entire length of data\n";
}
// Now lets read the string back
$my_string = shm_read($shm_id, 0, $shm_size);
if(!$my_string) {
echo "Couldn't read from shared memory block\n";
}
echo "The data inside shared memory was: ".$my_string."\n";
//Now lets delete the block and close the shared memory segment
if(!shm_delete($shm_id)) {
echo "Couldn't mark shared memory block for deletion.
}
shm_close($shm_id);
?>
</programlisting>
</example>
</para>
</partintro>
<refentry id="function.shm_open">
<refnamediv>
<refname>shm_open</refname>
<refpurpose>Create or open shared memory block</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>shm_open</function></funcdef>
<paramdef>int <parameter>key</parameter></paramdef>
<paramdef>string <parameter>flags</parameter></paramdef>
<paramdef>int <parameter>mode</parameter></paramdef>
<paramdef>int <parameter>size</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>shm_open</function> can create or open a shared memory block.
</para>
<para>
<function>shm_open</function> takes 4 parameters: key, which is the
system's id for the shared memory block, this parameter can be passed
as a decimal or hex. The second parameter are the flags that you can use:
<itemizedlist>
<listitem>
<simpara>
"a" for access (sets IPC_EXCL)
use this flag when you need to open an existing shared memory segment
</simpara>
</listitem>
<listitem>
<simpara>
"c" for create (sets IPC_CREATE)
use this flag when you need to create a new shared memory segment.
</simpara>
</listitem>
</itemizedlist>
The third parameter is the mode, which are the permissions that you
wish to assign to your memory segment, those are the same as permission
for a file. Permissions need to be passed in octal form ex. 0644.
The last parameter is size of the shared memory block you wish to create
in bytes.
<note><simpara>
Note: the 3rd and 4th should be entered as 0 if you are opening an
existing memory segment. On success <function>shm_open</function> will
return an id that you can use to access the shared memory segment
you've created.
</simpara></note>
</para>
<para>
<example>
<title>Create a new shared memory block</title>
<programlisting role="php">
<?php
$shm_id = shm_open(0x0fff, "c", 0644, 100);
?>
</programlisting>
</example>
</para>
<para>
This example opened a shared memory block with a system id of 0x0fff.
</para>
</refsect1>
</refentry>
<refentry id="function.shm_read">
<refnamediv>
<refname>shm_read</refname>
<refpurpose>Read data from shared memory block</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>string <function>shm_read</function></funcdef>
<paramdef>int <parameter>shmid</parameter></paramdef>
<paramdef>int <parameter>start</parameter></paramdef>
<paramdef>int <parameter>count</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>shm_read</function> will read a string from shared memory block.
</para>
<para>
<function>shm_read</function> takes 3 parameters: shmid, which is the shared
memory block identifier created by <function>shm_open</function>, offset from
which to start reading and count on the number of bytes to read.
</para>
<para>
<example>
<title>Reading shared memory block</title>
<programlisting role="php">
<?php
$shm_data = shm_read($shm_id, 0, 50);
?>
</programlisting>
</example>
</para>
<para>
This example will read 50 bytes from shared memory block and place the data
inside <literal>$shm_data</literal>.
</para>
</refsect1>
</refentry>
<refentry id="function.shm_write">
<refnamediv>
<refname>shm_write</refname>
<refpurpose>Write data into shared memory block</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>shm_write</function></funcdef>
<paramdef>int <parameter>shmid</parameter></paramdef>
<paramdef>string <parameter>data</parameter></paramdef>
<paramdef>int <parameter>offset</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>shm_write</function> will write a string into shared memory block.
</para>
<para>
<function>shm_write</function> takes 3 parameters: shmid, which is the
shared memory block identifier created by <function>shm_open</function>,
data, a string that you want to write into shared memory block and offset,
which specifies where to start writing data inside the shared memory segment.
</para>
<para>
<example>
<title>Writing to shared memory block</title>
<programlisting role="php">
<?php
$shm_bytes_written = shm_write($shm_id, $my_string, 0);
?>
</programlisting>
</example>
</para>
<para>
This example will write data inside <literal>$my_string</literal> into
shared memory block, <literal>$shm_bytes_written</literal> will contain
the number of bytes written.
</para>
</refsect1>
</refentry>
<refentry id="function.size">
<refnamediv>
<refname>shm_size</refname>
<refpurpose>Get size of shared memory block</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>shm_size</function></funcdef>
<paramdef>int <parameter>shmid</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>shm_size</function> is used to get the size, in bytes of the
shared memory block.
</para>
<para>
<function>shm_size</function> takes the shmid, which is the shared memory
block identifier created by <function>shm_open</function>, the function
will return and int, which represents the number of bytes the shared memory
block occupies.
</para>
<para>
<example>
<title>Getting the size of the shared memory block</title>
<programlisting role="php">
<?php
$shm_size = shm_size($shm_id);
?>
</programlisting>
</example>
</para>
<para>
This example will put the size of shared memory block identified by
<literal>$shm_id</literal> into <literal>$shm_size</literal>.
</para>
</refsect1>
</refentry>
<refentry id="function.shm_delete">
<refnamediv>
<refname>shm_delete</refname>
<refpurpose>Delete shared memory block</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>shm_delete</function></funcdef>
<paramdef>int <parameter>shmid</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>shm_delete</function> is used to delete a shared memory block.
</para>
<para>
<function>shm_delete</function> takes the shmid, which is the shared memory
block identifier created by <function>shm_open</function>. On success 1 is
returned, on failure 0 is returned.
</para>
<para>
<example>
<title>Deleting shared memory block</title>
<programlisting role="php">
<?php
shm_delete($shm_id);
?>
</programlisting>
</example>
</para>
<para>
This example will delete shared memory block identified by
<literal>$shm_id</literal>.
</para>
</refsect1>
</refentry>
<refentry id="function.shm_close">
<refnamediv>
<refname>shm_close</refname>
<refpurpose>Close shared memory block</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<funcsynopsis>
<funcprototype>
<funcdef>int <function>shm_close</function></funcdef>
<paramdef>int <parameter>shmid</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
<function>shm_close</function> is used to close a shared memory block.
</para>
<para>
<function>shm_close</function> takes the shmid, which is the shared memory
block identifier created by <function>shm_open</function>.
</para>
<para>
<example>
<title>Closing shared memory block</title>
<programlisting role="php">
<?php
shm_close($shm_id);
?>
</programlisting>
</example>
</para>
<para>
This example will close shared memory block identified by <literal>$shm_id</literal>.
</para>
</refsect1>
</refentry>
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
- Next message: Derick Rethans: "[PHP-DOC] cvs: phpdoc /nl Translators bookinfo.xml preface.xml /nl/appendices history.xml http-stuff.xml regexp.xml"
- Previous message: Derick Rethans: "Re: [PHP-DOC] cvs: phpdoc / lang-nl.ent manual.xml.in /nl bookinfo.xml chapters.ent preface.xml /nl/appendices debugger.xml escaping.xml history.xml http-stuff.xml migration.xml phpdevel.xml regexp.xml /nl/chapters config.xml copyright.xml install.xml intro.xml security.xml /nl/features connection-handling.xml cookies.xml error-handling.xml file-upload.xml http-auth.xml images.xml persistent-connections.xml remote-files.xml /nl/functions apache.xml array.xml aspell.xml bc.xml calendar.xml ccvs.xml classobj.xml com.xml cpdf.xml curl.xml cybercash.xml datetime.xml dba.xml dbase.xml dbm.xml dir.xml dl.xml domxml.xml errorfunc.xml exec.xml fdf.xml filepro.xml filesystem.xml ftp.xml funchand.xml gettext.xml http.xml hw.xml ibase.xml icap.xml ifx.xml image.xml imap.xml info.xml ldap.xml mail.xml math.xml mcal.xml mcrypt.xml mhash.xml misc.xml msql.xml mssql.xml mysql.xml network.xml nis.xml oci8.xml oracle.xml outcontrol.xml pcre.xml pdf.xml pfpro.xml pgsql.xml posix.xml pspell.xml readline.xml recode.xml regex.xml satellite.xml sem.xml session.xml shmop.xml snmp.xml sockets.xml strings.xml swf.xml sybase.xml uodbc.xml url.xml var.xml vmailmgr.xml wddx.xml xml.xml yaz.xml zlib.xml /nl/language basic-syntax.xml constants.xml control-structures.xml expressions.xml functions.xml oop.xml operators.xml references.xml types.xml variables.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

