Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 05cd670d8a02b2b4a0ffb1756f2e8308 > files > 9590

php-manual-zh-5.2.4-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>shm_attach</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="Semaphore, Shared Memory and IPC Functions"
HREF="ref.sem.html"><LINK
REL="PREVIOUS"
TITLE="sem_remove"
HREF="function.sem-remove.html"><LINK
REL="NEXT"
TITLE="shm_detach"
HREF="function.shm-detach.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=UTF-8"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP 手册</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.sem-remove.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.shm-detach.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.shm-attach"
></A
>shm_attach</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN205882"
></A
><P
>    (PHP 3 &#62;= 3.0.6, PHP 4, PHP 5)</P
>shm_attach&nbsp;--&nbsp;Creates or open a shared memory segment</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN205885"
></A
><H2
>Description</H2
>int <B
CLASS="methodname"
>shm_attach</B
> ( int key [, int memsize [, int perm]] )<BR
></BR
><P
>&#13;     <B
CLASS="function"
>shm_attach()</B
> returns an id that can be
     used to access the System V shared memory with the given <CODE
CLASS="parameter"
>key</CODE
>, the
     first call creates the shared memory segment with <CODE
CLASS="parameter"
>memsize</CODE
>
     (default: sysvshm.init_mem in the <TT
CLASS="filename"
>php.ini</TT
>, otherwise
     10000 bytes) and the optional perm-bits <CODE
CLASS="parameter"
>perm</CODE
>
     (default: 0666).
    </P
><P
>&#13;     A second call to <B
CLASS="function"
>shm_attach()</B
> for the same
     <CODE
CLASS="parameter"
>key</CODE
> will return a different shared memory
     identifier, but both identifiers access the same underlying
     shared memory. <CODE
CLASS="parameter"
>Memsize</CODE
> and
     <CODE
CLASS="parameter"
>perm</CODE
> will be ignored.
    </P
><P
>&#13;     See also <A
HREF="function.ftok.html"
><B
CLASS="function"
>ftok()</B
></A
>, and <A
HREF="function.shm-detach.html"
><B
CLASS="function"
>shm_detach()</B
></A
>.
    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.sem-remove.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>起始页</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.shm-detach.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>sem_remove</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.sem.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>shm_detach</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>