Sophie

Sophie

distrib > Mandriva > 2008.1 > i586 > by-pkgid > 703d980c580707c382b4e43e25965bc5 > files > 6332

php-manual-pt_BR-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
>file_get_contents</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Manual do PHP"
HREF="index.html"><LINK
REL="UP"
TITLE="Filesystem (Sistema de arquivos)"
HREF="ref.filesystem.html"><LINK
REL="PREVIOUS"
TITLE="file_exists"
HREF="function.file-exists.html"><LINK
REL="NEXT"
TITLE="file_put_contents"
HREF="function.file-put-contents.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"
>Manual do PHP</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.file-exists.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.file-put-contents.html"
ACCESSKEY="N"
>Próxima</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.file-get-contents"
></A
>file_get_contents</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN48735"
></A
><P
>    (PHP 4 &#62;= 4.3.0, PHP 5)</P
>file_get_contents&nbsp;--&nbsp;Le todo o conteúdo de um arquivo para uma string</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN48738"
></A
><H2
>Descrição</H2
>string <B
CLASS="methodname"
>file_get_contents</B
> ( string filename [, int use_include_path [, resource context]] )<BR
></BR
><P
>&#13;     Idêntico a <A
HREF="function.file.html"
><B
CLASS="function"
>file()</B
></A
>, exceto que
     <B
CLASS="function"
>file_get_contents()</B
> retorna o arquivo em uma string.
    </P
><P
>&#13;     <B
CLASS="function"
>file_get_contents()</B
> é o método preferível para ser ler o
     conteúdo de um arquivo em uma string. Ela usa tecnicas de mapeamento de memório
     suportadas em seu sistema operacional para melhorar a performance.
    </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Nota: </B
>Esta função é
 compatível com dados binários</P
></BLOCKQUOTE
></DIV
><DIV
CLASS="tip"
><BLOCKQUOTE
CLASS="tip"
><P
><B
>Dica: </B
>Você pode usar uma URL com esta
 função se <A
HREF="ref.filesystem.html#ini.allow-url-fopen"
>&#13; fopen wrappers</A
> estiver habilitado.
 Veja <A
HREF="function.fopen.html"
><B
CLASS="function"
>fopen()</B
></A
> para mais detalhes em como especificar
 o nome do arquivo e <A
HREF="wrappers.html"
>Apêndice N</A
> para uma lista de protocolos
 URL suportados.</P
></BLOCKQUOTE
></DIV
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Nota: </B
>
      O suporte ao contexto foi acrescentado no <TT
CLASS="literal"
>PHP 5.0.0</TT
>.
     </P
></BLOCKQUOTE
></DIV
><P
>&#13;     Veja também: <A
HREF="function.fgets.html"
><B
CLASS="function"
>fgets()</B
></A
>, <A
HREF="function.file.html"
><B
CLASS="function"
>file()</B
></A
>,
     <A
HREF="function.fread.html"
><B
CLASS="function"
>fread()</B
></A
>, <A
HREF="function.include.html"
><B
CLASS="function"
>include()</B
></A
>
     e <A
HREF="function.readfile.html"
><B
CLASS="function"
>readfile()</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.file-exists.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Principal</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.file-put-contents.html"
ACCESSKEY="N"
>Próxima</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>file_exists</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.filesystem.html"
ACCESSKEY="U"
>Acima</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>file_put_contents</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>