mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-23 22:52:12 +01:00
missing translation
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
ambientes de desenvolvimento populares do PHP no Windows se integram com
|
||||
esse formato da documentação para facilitar o acesso à documentação. Visualizadores de CHM para
|
||||
desktops Linux também estão disponíveis. Veja
|
||||
<link xlink:href="&url.xchm;">xCHM</link> or
|
||||
<link xlink:href="&url.xchm;">xCHM</link> ou
|
||||
<link xlink:href="&url.gnochm;">GnoCHM</link>.
|
||||
</para>
|
||||
|
||||
|
||||
@@ -152,12 +152,12 @@ Warning: Cannot call func_num_args() dynamically in %s on line %d
|
||||
|
||||
<sect2 xml:id="migration71.incompatible.rand-srand-aliases">
|
||||
<title>
|
||||
<function>rand</function> aliased to <function>mt_rand</function> and
|
||||
<function>srand</function> aliased to <function>mt_srand</function>
|
||||
<function>rand</function> sinônimo de <function>mt_rand</function> e
|
||||
<function>srand</function> sinônimo de <function>mt_srand</function>
|
||||
</title>
|
||||
|
||||
<para>
|
||||
<function>rand</function> e <function>srand</function> agora são apelidos
|
||||
<function>rand</function> e <function>srand</function> agora são sinônimos
|
||||
para <function>mt_rand</function> e <function>mt_srand</function>,
|
||||
respectivamente. Isto significa que a saída das funções a seguir foi
|
||||
alterada: <function>rand</function>, <function>shuffle</function>,
|
||||
@@ -169,7 +169,7 @@ Warning: Cannot call func_num_args() dynamically in %s on line %d
|
||||
<title>Não permitir o caractere de controle 'delete' ASCII em identificadores</title>
|
||||
|
||||
<para>
|
||||
O caractere de controle 'delete' ASCII (<literal>0x7F</literal>) não pode mais
|
||||
O caractere de controle ASCII 'DEL' (<literal>0x7F</literal>) não pode mais
|
||||
ser usado em identificadores que não estejam entre aspas.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
@@ -98,8 +98,8 @@
|
||||
|
||||
<para>
|
||||
Passar caracteres inválidos para as funções: <function>base_convert</function>,
|
||||
<function>bindec</function>, <function>octdec</function> and
|
||||
<function>hexdec</function>agora gerará um aviso de descontinuação.
|
||||
<function>bindec</function>, <function>octdec</function> e
|
||||
<function>hexdec</function> agora gerará um aviso de descontinuação.
|
||||
O resultado ainda será calculado como se os caracteres inválidos não existissem.
|
||||
Os espaços em branco à esquerda e à direita, bem como os prefixos do tipo 0x (dependendo da base)
|
||||
continuam sendo permitidos.
|
||||
|
||||
@@ -305,7 +305,7 @@ ArgumentCountError - fazeriogurte(): Argument #1 ($recepiente) not passed
|
||||
</para>
|
||||
<para>
|
||||
Chamar <methodname>PDOStatement::bindColumn</methodname> com
|
||||
<constant>PDO::PARAM_LOB</constant> agor irá constantemente vincular um resultado de stream
|
||||
<constant>PDO::PARAM_LOB</constant> agor irá constantemente vincular um resultado de fluxo
|
||||
quando <constant>PDO::ATTR_STRINGIFY_FETCHES</constant> não está habilitado.
|
||||
Anteriormente, o resultado seria um fluxo ou string dependendo do
|
||||
driver de banco de dados utilizado e a hora que a vinculação é realizada.
|
||||
|
||||
@@ -279,7 +279,7 @@ AddType application/x-httpd-php .php
|
||||
<question>
|
||||
<para>
|
||||
Windows: Eu instalei o PHP, mas quando tento acessar
|
||||
um arquivo de script PHP através do meu browser, eu recebo o erro:
|
||||
um arquivo de script PHP através do meu navegador, eu recebo o erro:
|
||||
<screen>
|
||||
<![CDATA[
|
||||
cgi error:
|
||||
|
||||
@@ -580,7 +580,7 @@ echo memory_get_peak_usage(), "\n";
|
||||
<programlisting role="shell">
|
||||
<![CDATA[
|
||||
time php -dzend.enable_gc=0 -dmemory_limit=-1 -n example2.php
|
||||
# and
|
||||
# e
|
||||
time php -dzend.enable_gc=1 -dmemory_limit=-1 -n example2.php
|
||||
]]>
|
||||
</programlisting>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
gzip or
|
||||
gzip ou
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
||||
@@ -481,7 +481,7 @@ violará o protocolo fechando a conexão sem enviar uma notificação
|
||||
Protocol Error" quando chegar ao final dos dados. Para contornar isso, o
|
||||
valor de <link linkend="ini.error-reporting">error_reporting</link> deve ser
|
||||
reduzido a um nível que não inclua avisos.
|
||||
O PHP pode detectar servidores IIS defeituosos quando o stream
|
||||
O PHP pode detectar servidores IIS defeituosos quando o fluxo
|
||||
é aberto usando o empacotador <literal>https://</literal> e suprimirá o aviso.
|
||||
Ao usar <function>fsockopen</function> para criar um soquete
|
||||
<literal>ssl://</literal>, o desenvolvedor é responsável por detectar
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<para>
|
||||
A função <function>serialize</function> retorna uma string contendo uma
|
||||
representação byte-stream de qualquer valor que pode ser armazenado pelo
|
||||
representação em fluxo de bytes de qualquer valor que pode ser armazenado pelo
|
||||
PHP. A função <function>unserialize</function> pode utilizar essa string para
|
||||
recriar os valores originais da variável. Utilizar a serialização para
|
||||
salvar um objeto, salvará todas as variáveis de um objeto. Os
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<para>
|
||||
Classes que implementam esta intarface não possuem mais suporte aos métodos
|
||||
<link linkend="object.sleep">__sleep()</link> and
|
||||
<link linkend="object.sleep">__sleep()</link> e
|
||||
<link linkend="object.wakeup">__wakeup()</link>. O método de serialização é
|
||||
chamado não importando se uma instância possui a necessidade de ser serializada. Não invoca o método __destruct(),
|
||||
ou possui qualquer outro efeito colateral a não ser que programado no método. Quando os dados são
|
||||
|
||||
@@ -62,7 +62,7 @@ if ($oid){
|
||||
// o tipo da coluna "image" é "object"
|
||||
$req = cubrid_execute($con, "insert into person(image) values($oid)");
|
||||
if ($req) {
|
||||
echo "image inserted successfully";
|
||||
echo "imagem inserida com sucesso";
|
||||
cubrid_close_request($req);
|
||||
cubrid_commit($con);
|
||||
}
|
||||
|
||||
@@ -110,11 +110,11 @@ do {
|
||||
if ($info['result'] === CURLE_OK) {
|
||||
$statusCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
|
||||
|
||||
echo "Request to {$url} finished with HTTP status {$statusCode}:", PHP_EOL;
|
||||
echo "A requisição a {$url} terminou com o status HTTP {$statusCode}:", PHP_EOL;
|
||||
echo curl_multi_getcontent($handle);
|
||||
echo PHP_EOL, PHP_EOL;
|
||||
} else {
|
||||
echo "Request to {$url} failed with error: ", PHP_EOL;
|
||||
echo "A requisição a {$url} falhou com erro: ", PHP_EOL;
|
||||
echo curl_strerror($info['result']);
|
||||
echo PHP_EOL, PHP_EOL;
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
<entry>
|
||||
<literal>;</literal>,
|
||||
<literal>:</literal>, <literal>/</literal>, <literal>.</literal>,
|
||||
<literal>,</literal>, <literal>-</literal>, <literal>(</literal> or
|
||||
<literal>,</literal>, <literal>-</literal>, <literal>(</literal> ou
|
||||
<literal>)</literal>
|
||||
</entry>
|
||||
<entry>O caractere especificado.</entry>
|
||||
|
||||
@@ -574,7 +574,7 @@ object(DateTimeImmutable)#1 (3) {
|
||||
<literal>DD</literal>. Dia 0 corresponde a último dia do mês
|
||||
anterior, assim como excedências positivas contam no próximo mês. Isso faz com que
|
||||
"2008-08-00" seja equivalente a "2008-07-31" e "2008-07-31" seja equivalente
|
||||
a "2008-07-01" (Junho possui somente 30 dias).
|
||||
a "2008-07-01" (junho possui somente 30 dias).
|
||||
</para>
|
||||
<para>
|
||||
Note que o intervalo de dia é restrito a 0-31 como indicado
|
||||
@@ -582,9 +582,9 @@ object(DateTimeImmutable)#1 (3) {
|
||||
por exemplo.
|
||||
</para>
|
||||
<para>
|
||||
É possível exceder negativamente os formatos <literal>mm</literal> and
|
||||
É possível exceder negativamente os formatos <literal>mm</literal> e
|
||||
<literal>MM</literal> com o valor 0. O valor de mês
|
||||
0 corresponde a Dezembro do mês anterior. Como exemplo, "2008-00-22" é
|
||||
0 corresponde a dezembro do mês anterior. Como exemplo, "2008-00-22" é
|
||||
equivalente a "2007-12-22".
|
||||
</para>
|
||||
<para>
|
||||
@@ -593,7 +593,7 @@ object(DateTimeImmutable)#1 (3) {
|
||||
para "2007-12-00" que então será convertido para "2007-11-30". Isso também
|
||||
acontece com a string "0000-00-00", que é transformada em
|
||||
"-0001-11-30" (o ano -1 ano calendário ISO 8601, que é 2 anos DC no calendário
|
||||
que antecede o calendário Gregoriano).
|
||||
que antecede o calendário gregoriano).
|
||||
</para>
|
||||
</caution>
|
||||
</sect1>
|
||||
|
||||
@@ -112,8 +112,8 @@ $query = '//book/chapter/para/informaltable/tgroup/tbody/row/entry[. = "en"]';
|
||||
$entries = $xpath->query($query);
|
||||
|
||||
foreach ($entries as $entry) {
|
||||
echo "Found {$entry->previousSibling->previousSibling->nodeValue}," .
|
||||
" by {$entry->previousSibling->nodeValue}\n";
|
||||
echo "Encontrado {$entry->previousSibling->previousSibling->nodeValue}," .
|
||||
" por {$entry->previousSibling->nodeValue}\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
@@ -121,8 +121,8 @@ foreach ($entries as $entry) {
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Found The Grapes of Wrath, by John Steinbeck
|
||||
Found The Pearl, by John Steinbeck
|
||||
Encontrado The Grapes of Wrath, por John Steinbeck
|
||||
Encontrado The Pearl, por John Steinbeck
|
||||
]]>
|
||||
</screen>
|
||||
<para>
|
||||
@@ -148,8 +148,8 @@ $query = 'row/entry[. = "en"]';
|
||||
$entries = $xpath->query($query, $tbody);
|
||||
|
||||
foreach ($entries as $entry) {
|
||||
echo "Found {$entry->previousSibling->previousSibling->nodeValue}," .
|
||||
" by {$entry->previousSibling->nodeValue}\n";
|
||||
echo "Encontrado {$entry->previousSibling->previousSibling->nodeValue}," .
|
||||
" por {$entry->previousSibling->nodeValue}\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -150,11 +150,11 @@ $xpath->registerPhpFunctions();
|
||||
// hama a função substr no título do livro
|
||||
$nodes = $xpath->query('//book[php:functionString("substr", title, 0, 3) = "PHP"]');
|
||||
|
||||
echo "Found {$nodes->length} books starting with 'PHP':\n";
|
||||
echo "Encontrados {$nodes->length} livros que iniciam com 'PHP':\n";
|
||||
foreach ($nodes as $node) {
|
||||
$title = $node->getElementsByTagName("title")->item(0)->nodeValue;
|
||||
$author = $node->getElementsByTagName("author")->item(0)->nodeValue;
|
||||
echo "$title by $author\n";
|
||||
echo "$title por $author\n";
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -163,9 +163,9 @@ foreach ($nodes as $node) {
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Found 2 books starting with 'PHP':
|
||||
PHP Basics by Jim Smith
|
||||
PHP Secrets by Jenny Smythe
|
||||
Encontrados 2 livros que iniciam com 'PHP':
|
||||
PHP Basics por Jim Smith
|
||||
PHP Secrets por Jenny Smythe
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
@@ -194,7 +194,7 @@ function has_multiple($nodes) {
|
||||
// Filtra livros com múltiplos autores
|
||||
$books = $xpath->query('//book[php:function("has_multiple", author)]');
|
||||
|
||||
echo "Books with multiple authors:\n";
|
||||
echo "Livros com múltiplos autores:\n";
|
||||
foreach ($books as $book) {
|
||||
echo $book->getElementsByTagName("title")->item(0)->nodeValue . "\n";
|
||||
}
|
||||
@@ -205,7 +205,7 @@ foreach ($books as $book) {
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Books with multiple authors:
|
||||
Livros com múltiplos autores:
|
||||
PHP Basics
|
||||
]]>
|
||||
</screen>
|
||||
@@ -242,7 +242,7 @@ foreach ($books as $book) {
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Books with multiple authors:
|
||||
Livros com múltiplos autores:
|
||||
PHP Basics
|
||||
]]>
|
||||
</screen>
|
||||
|
||||
@@ -392,7 +392,7 @@ Ev::run();
|
||||
$pid = pcntl_fork();
|
||||
|
||||
if ($pid == -1) {
|
||||
fprintf(STDERR, "pcntl_fork failed\n");
|
||||
fprintf(STDERR, "pcntl_fork falhou\n");
|
||||
} elseif ($pid) {
|
||||
$w = new EvChild($pid, FALSE, function ($w, $revents) {
|
||||
$w->stop();
|
||||
@@ -405,7 +405,7 @@ if ($pid == -1) {
|
||||
// Proteção contra zumbis
|
||||
pcntl_wait($status);
|
||||
} else {
|
||||
//filho bifurcado
|
||||
// Filho bifurcado
|
||||
exit(2);
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
</methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Behaves as
|
||||
<methodname>EventBuffer::read</methodname>
|
||||
, except that it does not copy the data: it just removes it from the front
|
||||
of the buffer.
|
||||
Comporta-se como
|
||||
<methodname>EventBuffer::read</methodname>,
|
||||
exceto que não copia os dados, somente remove-os da frente
|
||||
do buffer.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
|
||||
@@ -113,7 +113,7 @@ $http = new EventHttp($base);
|
||||
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
|
||||
|
||||
if (!$http->bind("127.0.0.1", 8088)) {
|
||||
exit("bind(1) failed\n");
|
||||
exit("bind(1) falhou\n");
|
||||
};
|
||||
|
||||
$http->setDefaultCallback(function($req) {
|
||||
|
||||
@@ -1056,7 +1056,7 @@ class MyListenerConnection {
|
||||
array($this, "echoEventCallback"), NULL);
|
||||
|
||||
if (!$this->bev->enable(Event::READ)) {
|
||||
echo "Failed to enable READ\n";
|
||||
echo "Falha ao habilitar READ\n";
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1204,7 +1204,7 @@ class Handler {
|
||||
EventBufferEvent::OPT_CLOSE_ON_FREE);
|
||||
|
||||
if (!$this->connections[$id]['cnx']) {
|
||||
echo "Failed creating buffer\n";
|
||||
echo "Falha ao criar buffer\n";
|
||||
$this->base->exit(NULL);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Filtra todas informações de <varname>$_GET</varname>, <varname>$_POST</varname>,
|
||||
<varname>$_COOKIE</varname>, <varname>$_REQUEST</varname> and
|
||||
<varname>$_COOKIE</varname>, <varname>$_REQUEST</varname> e
|
||||
<varname>$_SERVER</varname> com este filtro.
|
||||
A informação original pode ser acessada através da <function>filter_input</function>.
|
||||
</para>
|
||||
|
||||
@@ -73,16 +73,16 @@ if ($fd) {
|
||||
fclose($fd);
|
||||
|
||||
if (!is_string($blob)) {
|
||||
// import failed
|
||||
// falha na importação
|
||||
} else {
|
||||
$query = "INSERT INTO foo (name, data) VALUES ('$filename', ?)";
|
||||
$prepared = ibase_prepare($dbh, $query);
|
||||
if (!ibase_execute($prepared, $blob)) {
|
||||
// record insertion failed
|
||||
// falha na inserção do registro
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// unable to open the data file
|
||||
// não foi possível abrir o arquivo de dados
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -124,10 +124,10 @@
|
||||
<refsect1 role="errors">
|
||||
&reftitle.errors;
|
||||
<para>
|
||||
Se você ter um erro parecido com "arithmetic exception, numeric overflow, or
|
||||
Se você tiver um erro parecido com "Arithmetic exception, numeric overflow, or
|
||||
string truncation. Cannot transliterate character between character sets"
|
||||
(isto ocorre quando você tenta usar algum caractere com acento) ao usar esta função
|
||||
e depois de <function>ibase_query</function> deve-se definir o conjunto de caracteres
|
||||
e depois de <function>ibase_query</function>, deve-se definir o conjunto de caracteres
|
||||
(isto é, ISO8859_1 ou o conjunto de caracteres atual).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
<literal><install-dir>/lib/php/extensions/ <debug-or-not>-<zts-or-not>-ZEND_MODULE_API_NO</literal>,
|
||||
e.g.
|
||||
<filename>/usr/local/php/lib/php/extensions/debug-non-zts-20010901</filename>
|
||||
or
|
||||
ou
|
||||
<filename>/usr/local/php/lib/php/extensions/no-debug-zts-20010901</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
@@ -606,8 +606,8 @@
|
||||
Campo de calendário que abrange a informação em
|
||||
<constant>IntlCalendar::FIELD_HOUR_OF_DAY</constant>,
|
||||
<constant>IntlCalendar::FIELD_MINUTE</constant>,
|
||||
<constant>IntlCalendar::FIELD_SECOND</constant> and
|
||||
<constant>IntlCalendar::FIELD_MILLISECOND</constant>. O intervalor é de
|
||||
<constant>IntlCalendar::FIELD_SECOND</constant> e
|
||||
<constant>IntlCalendar::FIELD_MILLISECOND</constant>. O intervalo é de
|
||||
<literal>0</literal> a <literal>24 * 3600 * 1000 - 1</literal>. Não é
|
||||
a quantidade de milissegundos decorridos no dia pois em transições
|
||||
de horário de verão haverá descontinuidades análogas àquelas do
|
||||
|
||||
@@ -153,11 +153,11 @@ stdClass Object
|
||||
</example>
|
||||
|
||||
<example xml:id="mongodb-driver-cursor.examples.tailable">
|
||||
<title>Reading a result set for a tailable cursor</title>
|
||||
<title>Lendo um conjunto de resultados com um cursor adaptável</title>
|
||||
<para>
|
||||
<link xlink:href="&url.mongodb.docs;core/tailable-cursors">Cursores adaptáveis</link>
|
||||
são um tipo especial de cursor no MongoDB que permite ao cliente ler alguns
|
||||
resultado e então esperar até que mais documentos fiquem disponíveis. Esses cursores
|
||||
resultados e então esperar até que mais documentos fiquem disponíveis. Esses cursores
|
||||
são usado principalmente com
|
||||
<link xlink:href="&url.mongodb.docs;core/capped-collections">Coleções Limitadas</link>
|
||||
e <link xlink:href="&url.mongodb.docs;changeStreams">Fluxos de Alterações</link>.
|
||||
|
||||
@@ -13,17 +13,17 @@
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// Connecting, selecting database
|
||||
// Conectando e selecionando o banco de dados
|
||||
$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')
|
||||
or die('Could not connect: ' . mysql_error());
|
||||
echo 'Connected successfully';
|
||||
mysql_select_db('my_database') or die('Could not select database');
|
||||
or die('Não foi possível conectar: ' . mysql_error());
|
||||
echo 'Conectado com sucesso';
|
||||
mysql_select_db('my_database') or die('Não foi possível selecionar o banco de dados');
|
||||
|
||||
// Performing SQL query
|
||||
// Realizado a consulta SQL
|
||||
$query = 'SELECT * FROM my_table';
|
||||
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
|
||||
$result = mysql_query($query) or die('A consulta falhou: ' . mysql_error());
|
||||
|
||||
// Printing results in HTML
|
||||
// Exebindo os resultados em HTML
|
||||
echo "<table>\n";
|
||||
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
|
||||
echo "\t<tr>\n";
|
||||
@@ -34,10 +34,10 @@ while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
|
||||
}
|
||||
echo "</table>\n";
|
||||
|
||||
// Free resultset
|
||||
// Libera o conjunto de resultados
|
||||
mysql_free_result($result);
|
||||
|
||||
// Closing connection
|
||||
// Fecha a conexão
|
||||
mysql_close($link);
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -57,9 +57,9 @@
|
||||
<?php
|
||||
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
|
||||
if (!$link) {
|
||||
die('Could not connect: ' . mysql_error());
|
||||
die('Não foi possível conectar: ' . mysql_error());
|
||||
}
|
||||
echo 'Connected successfully';
|
||||
echo 'Conectado com sucesso';
|
||||
mysql_close($link);
|
||||
?>
|
||||
]]>
|
||||
@@ -67,7 +67,7 @@ mysql_close($link);
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Connected successfully
|
||||
Conectado com sucesso
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
@@ -80,8 +80,8 @@ Connected successfully
|
||||
<para>
|
||||
<function>mysql_close</function> não irá fechar conexões persistentes
|
||||
criadas por <function>mysql_pconnect</function>.
|
||||
Para detalhes adicionais, veja o manual em
|
||||
<link linkend="features.persistent-connections">persistent connections</link>.
|
||||
Para detalhes adicionais, consulte a seção sobre
|
||||
<link linkend="features.persistent-connections">conexões persistentes</link>.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
@@ -69,14 +69,14 @@
|
||||
<?php
|
||||
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
|
||||
if (!$link) {
|
||||
die('Could not connect: ' . mysql_error());
|
||||
die('Não foi possível conectar: ' . mysql_error());
|
||||
}
|
||||
|
||||
$sql = 'CREATE DATABASE my_db';
|
||||
if (mysql_query($sql, $link)) {
|
||||
echo "Database my_db created successfully\n";
|
||||
echo "Banco de dados my_db criado com sucesso\n";
|
||||
} else {
|
||||
echo 'Error creating database: ' . mysql_error() . "\n";
|
||||
echo 'Erro ao criar banco de dados: ' . mysql_error() . "\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
@@ -84,7 +84,7 @@ if (mysql_query($sql, $link)) {
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Database my_db created successfully
|
||||
Banco de dados my_db criado com sucesso
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<?php
|
||||
$result = mysql_query("SELECT id,email FROM people WHERE id = '42'");
|
||||
if (!$result) {
|
||||
echo 'Could not run query: ' . mysql_error();
|
||||
echo 'Não foi possível executar a consulta: ' . mysql_error();
|
||||
exit;
|
||||
}
|
||||
$row = mysql_fetch_assoc($result);
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<?php
|
||||
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
|
||||
if (!$link) {
|
||||
die('Could not connect: ' . mysql_error());
|
||||
die('Não foi possível conectar: ' . mysql_error());
|
||||
}
|
||||
printf("MySQL host info: %s\n", mysql_get_host_info());
|
||||
?>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<?php
|
||||
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
|
||||
if (!$link) {
|
||||
die('Could not connect: ' . mysql_error());
|
||||
die('Não foi possível conectar: ' . mysql_error());
|
||||
}
|
||||
printf("MySQL protocol version: %s\n", mysql_get_proto_info());
|
||||
?>
|
||||
|
||||
@@ -56,16 +56,16 @@
|
||||
<?php
|
||||
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
|
||||
if (!$link) {
|
||||
die('Could not connect: ' . mysql_error());
|
||||
die('Não foi possível conectar: ' . mysql_error());
|
||||
}
|
||||
printf("MySQL server version: %s\n", mysql_get_server_info());
|
||||
printf("Versão do servidor MySQL: %s\n", mysql_get_server_info());
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
MySQL server version: 4.0.1-alpha
|
||||
Versão do servidor MySQL: 4.0.1-alpha
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<?php
|
||||
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
|
||||
if (!$link) {
|
||||
die('Could not connect: ' . mysql_error());
|
||||
die('Não foi possível conectar: ' . mysql_error());
|
||||
}
|
||||
mysql_select_db('mydb');
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
<?php
|
||||
$result = mysql_query("SHOW COLUMNS FROM sometable");
|
||||
if (!$result) {
|
||||
echo 'Could not run query: ' . mysql_error();
|
||||
echo 'Não foi possível executar a consulta: ' . mysql_error();
|
||||
exit;
|
||||
}
|
||||
if (mysql_num_rows($result) > 0) {
|
||||
|
||||
@@ -51,7 +51,7 @@ $mysqli = new mysqli("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* check connection */
|
||||
if ($mysqli->connect_errno) {
|
||||
printf("Connect failed: %s\n", $mysqli->connect_error);
|
||||
printf("Conexão falhou: %s\n", $mysqli->connect_error);
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ $link = mysqli_connect("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* check connection */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ $mysqli = new mysqli("localhost", "nobody", "");
|
||||
|
||||
/* verifica a conexão */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ $link = mysqli_connect("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* verifica a conexão */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ $mysqli = new mysqli("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* check connection */
|
||||
if ($mysqli->connect_errno) {
|
||||
printf("Connect failed: %s\n", $mysqli->connect_error);
|
||||
printf("Conexão falhou: %s\n", $mysqli->connect_error);
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ $link = mysqli_connect("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* check connection */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ $mysqli = new mysqli("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* verifica conexão */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ $link = mysqli_connect("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* verifica conexão */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -117,13 +117,13 @@ $query .= "SELECT Name FROM City ORDER BY ID LIMIT 20, 5";
|
||||
/* executa as consultas múltiplas */
|
||||
$mysqli->multi_query($query);
|
||||
do {
|
||||
/* store the result set in PHP */
|
||||
/* armazena o conjunto de resultados no PHP */
|
||||
if ($result = $mysqli->store_result()) {
|
||||
while ($row = $result->fetch_row()) {
|
||||
printf("%s\n", $row[0]);
|
||||
}
|
||||
}
|
||||
/* print divider */
|
||||
/* divisor de impressão */
|
||||
if ($mysqli->more_results()) {
|
||||
printf("-----------------\n");
|
||||
}
|
||||
@@ -144,13 +144,13 @@ $query .= "SELECT Name FROM City ORDER BY ID LIMIT 20, 5";
|
||||
/* executa as consultas múltiplas */
|
||||
mysqli_multi_query($link, $query);
|
||||
do {
|
||||
/* store the result set in PHP */
|
||||
/* armazena o conjunto de resultados no PHP */
|
||||
if ($result = mysqli_store_result($link)) {
|
||||
while ($row = mysqli_fetch_row($result)) {
|
||||
printf("%s\n", $row[0]);
|
||||
}
|
||||
}
|
||||
/* print divider */
|
||||
/* divisor de impressão */
|
||||
if (mysqli_more_results($link)) {
|
||||
printf("-----------------\n");
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ $result = $mysqli->query("SELECT * FROM City", MYSQLI_USE_RESULT);
|
||||
|
||||
/* Observe que não podemos executar nenhuma função que interaja com o
|
||||
servidor até que todos os registros tenham sido totalmente recuperados ou o resultado
|
||||
conjunto foi fechado. Todas as chamadas retornarão um erro 'fora de sincronia'*/
|
||||
conjunto foi fechado. Todas as chamadas retornarão um erro 'fora de sincronia' */
|
||||
$mysqli->query("SET @a:='isso não vai funcionar'");
|
||||
]]>
|
||||
</programlisting>
|
||||
@@ -172,16 +172,16 @@ $link = mysqli_connect("localhost", "my_user", "my_password", "world");
|
||||
mysqli_query($link, "CREATE TEMPORARY TABLE myCity LIKE City");
|
||||
printf("Tabela myCity criada com sucesso.\n");
|
||||
|
||||
/* Select queries return a resultset */
|
||||
/* Consultas de seleção retornam um conjunto de resultados */
|
||||
$result = mysqli_query($link, "SELECT Name FROM City LIMIT 10");
|
||||
printf("Select retornou %d linhas.\n", mysqli_num_rows($result));
|
||||
|
||||
/* Se tivermos que recuperar uma grande quantidade de dados, usamos MYSQLI_USE_RESULT */
|
||||
$result = mysqli_query($link, "SELECT * FROM City", MYSQLI_USE_RESULT);
|
||||
|
||||
* Observe que não podemos executar nenhuma função que interaja com o
|
||||
/* Observe que não podemos executar nenhuma função que interaja com o
|
||||
servidor até que todos os registros tenham sido totalmente recuperados ou o resultado
|
||||
conjunto foi fechado. Todas as chamadas retornarão um erro 'fora de sincronia'*/
|
||||
conjunto foi fechado. Todas as chamadas retornarão um erro 'fora de sincronia' */
|
||||
mysqli_query($link, "SET @a:='isso não vai funcionar'");
|
||||
]]>
|
||||
</programlisting>
|
||||
|
||||
@@ -91,7 +91,7 @@ $link = mysqli_connect("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* verifica a conexão */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ $link = mysqli_connect("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* verifica a conexão */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ $result = $mysqli->query("SELECT Name, CountryCode, District, Population FROM Ci
|
||||
/* Obtém o número de campos do resultado */
|
||||
$field_cnt = $result->field_count;
|
||||
|
||||
printf("Result set has %d fields.\n", $field_cnt);
|
||||
printf("O conjunto de resultados tem %d campos.\n", $field_cnt);
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
@@ -71,13 +71,13 @@ $result = mysqli_query($link, "SELECT Name, CountryCode, District, Population FR
|
||||
/* Obtém o número de campos do resultado */
|
||||
$field_cnt = mysqli_num_fields($result);
|
||||
|
||||
printf("Result set has %d fields.\n", $field_cnt);
|
||||
printf("O conjunto de resultados tem %d campos.\n", $field_cnt);
|
||||
]]>
|
||||
</programlisting>
|
||||
&examples.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Result set has 4 fields.
|
||||
O conjunto de resultados tem 4 campos.
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
||||
@@ -92,7 +92,7 @@ $mysqli = new mysqli("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* verifica a conexão */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ $link = mysqli_connect("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* verifica a conexão */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ $mysqli = new mysqli("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* Verifica a conexão */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ $link = mysqli_connect("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* Verifica a conexão */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ $mysqli = new mysqli("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* Verifica a conexão */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ $link = mysqli_connect("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* Verifica a conexão */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ $mysqli = new mysqli("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* Verifica a conexão */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ $link = mysqli_connect("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* Verifica a conexão */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ $mysqli = new mysqli("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* verifica a conexão */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ $link = mysqli_connect("localhost", "my_user", "my_password", "world");
|
||||
|
||||
/* verifica a conexão */
|
||||
if (mysqli_connect_errno()) {
|
||||
printf("Connect failed: %s\n", mysqli_connect_error());
|
||||
printf("Conexão falhou: %s\n", mysqli_connect_error());
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -625,13 +625,13 @@ static MY_CONN_PROPERTIES** get_conn_properties(const MYSQLND *conn TSRMLS_DC) {
|
||||
de métodos de objeto</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Resultset Meta (MYSQLND_RES_METADATA)</entry>
|
||||
<entry>Metadados do conjunto de resultados (MYSQLND_RES_METADATA)</entry>
|
||||
<entry>MINIT</entry>
|
||||
<entry>Não</entry>
|
||||
<entry>mysqlnd_result_metadata_get_methods()</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Statement (MYSQLND_STMT)</entry>
|
||||
<entry>Instrução (MYSQLND_STMT)</entry>
|
||||
<entry>MINIT</entry>
|
||||
<entry>Não</entry>
|
||||
<entry>mysqlnd_stmt_get_methods()</entry>
|
||||
@@ -693,7 +693,7 @@ static MY_CONN_PROPERTIES** get_conn_properties(const MYSQLND *conn TSRMLS_DC) {
|
||||
<entry>mysqlnd_connect()</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Resultset(MYSQLND_RES)</entry>
|
||||
<entry>Conjunto de resultados (MYSQLND_RES)</entry>
|
||||
<entry><para>
|
||||
Alocação:
|
||||
</para>
|
||||
|
||||
@@ -122,7 +122,7 @@ try {
|
||||
array(PDO::ATTR_PERSISTENT => true));
|
||||
echo "Connected\n";
|
||||
} catch (Exception $e) {
|
||||
die("Unable to connect: " . $e->getMessage());
|
||||
die("Não foi possível conectar: " . $e->getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -136,7 +136,7 @@ try {
|
||||
|
||||
} catch (Exception $e) {
|
||||
$dbh->rollBack();
|
||||
echo "Failed: " . $e->getMessage();
|
||||
echo "Falha: " . $e->getMessage();
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -93,13 +93,13 @@
|
||||
<?php
|
||||
$rar_arch = RarArchive::open('solid.rar');
|
||||
if ($rar_arch === FALSE)
|
||||
die("Could not open RAR archive.");
|
||||
die("Não foi possível abrir o arquivo RAR.");
|
||||
|
||||
$rar_entries = $rar_arch->getEntries();
|
||||
if ($rar_entries === FALSE)
|
||||
die("Could not retrieve entries.");
|
||||
die("Não foi possível recuperar entradas.");
|
||||
|
||||
echo "Found " . count($rar_entries) . " entries.\n";
|
||||
echo "Encontradas " . count($rar_entries) . " entradas.\n";
|
||||
|
||||
foreach ($rar_entries as $e) {
|
||||
echo $e;
|
||||
@@ -112,7 +112,7 @@ $rar_arch->close();
|
||||
&example.outputs.similar;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Found 2 entries.
|
||||
Encontradas 2 entradas.
|
||||
RarEntry for file "tese.txt" (23b93a7a)
|
||||
RarEntry for file "unrardll.txt" (2ed64b6e)
|
||||
]]>
|
||||
@@ -127,13 +127,13 @@ RarEntry for file "unrardll.txt" (2ed64b6e)
|
||||
<?php
|
||||
$rar_arch = rar_open('solid.rar');
|
||||
if ($rar_arch === FALSE)
|
||||
die("Could not open RAR archive.");
|
||||
die("Não foi possível abrir o arquivo RAR.");
|
||||
|
||||
$rar_entries = rar_list($rar_arch);
|
||||
if ($rar_entries === FALSE)
|
||||
die("Could retrieve entries.");
|
||||
die("Não foi possível recuperar entradas.");
|
||||
|
||||
echo "Found " . count($rar_entries) . " entries.\n";
|
||||
echo "Encontradas " . count($rar_entries) . " entradas.\n";
|
||||
|
||||
foreach ($rar_entries as $e) {
|
||||
echo $e;
|
||||
|
||||
@@ -76,10 +76,10 @@
|
||||
<?php
|
||||
$rar_arch = RarArchive::open('solid.rar');
|
||||
if ($rar_arch === FALSE)
|
||||
die("Could not open RAR archive.");
|
||||
die("Não foi possível abrir o arquivo RAR.");
|
||||
$rar_entry = $rar_arch->getEntry('tese.txt');
|
||||
if ($rar_entry === FALSE)
|
||||
die("Could not get such entry");
|
||||
die("Não foi possível recupera esta entrada");
|
||||
echo get_class($rar_entry)."\n";
|
||||
echo $rar_entry;
|
||||
$rar_arch->close();
|
||||
@@ -103,10 +103,10 @@ RarEntry for file "tese.txt" (23b93a7a)
|
||||
<?php
|
||||
$rar_arch = rar_open('solid.rar');
|
||||
if ($rar_arch === FALSE)
|
||||
die("Could not open RAR archive.");
|
||||
die("Não foi possível abrir o arquivo RAR.");
|
||||
$rar_entry = rar_entry_get($rar_arch, 'tese.txt');
|
||||
if ($rar_entry === FALSE)
|
||||
die("Could not get such entry");
|
||||
die("Não foi possível recupera esta entrada");
|
||||
echo get_class($rar_entry)."\n";
|
||||
echo $rar_entry;
|
||||
rar_close($rar_arch);
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
or
|
||||
ou
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
em ordem de preferência.
|
||||
</entry>
|
||||
<entry>
|
||||
<literal>ssh-rsa</literal> and
|
||||
<literal>ssh-rsa</literal> e
|
||||
<literal>ssh-dss</literal>
|
||||
</entry>
|
||||
</row>
|
||||
|
||||
@@ -33,7 +33,7 @@ try {
|
||||
|
||||
try {
|
||||
if(!$va->auth()) {
|
||||
throw new VarnishException("Auth failed\n");
|
||||
throw new VarnishException("Autenticação falhou\n");
|
||||
}
|
||||
} catch (VarnishException $e) {
|
||||
echo $e->getMessage();
|
||||
|
||||
@@ -112,7 +112,7 @@ function scan_titles($id, $startterm)
|
||||
}
|
||||
echo '</table>';
|
||||
} else {
|
||||
echo "Scan failed. Error: " . yaz_error($id) . "<br />";
|
||||
echo "Falha na varredura. Erro: " . yaz_error($id) . "<br />";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -87,13 +87,13 @@
|
||||
$zip = new ZipArchive;
|
||||
if ($zip->open('test.zip') === TRUE) {
|
||||
if($zip->addEmptyDir('newDirectory')) {
|
||||
echo 'Created a new root directory';
|
||||
echo 'Criado um novo diretório raiz';
|
||||
} else {
|
||||
echo 'Could not create the directory';
|
||||
echo 'Não foi possível criar o diretório';
|
||||
}
|
||||
$zip->close();
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -140,7 +140,7 @@ if ($zip->open('test.zip') === TRUE) {
|
||||
$zip->close();
|
||||
echo 'ok';
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -101,7 +101,7 @@ if ($res === TRUE) {
|
||||
$zip->close();
|
||||
echo 'ok';
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
@@ -118,7 +118,7 @@ if ($zip->open('test.zip') === TRUE) {
|
||||
$zip->close();
|
||||
echo 'ok';
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
$zip = new ZipArchive();
|
||||
$ret = $zip->open('application.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE);
|
||||
if ($ret !== TRUE) {
|
||||
printf('Failed with code %d', $ret);
|
||||
printf('Falha com código %d', $ret);
|
||||
} else {
|
||||
$options = array('add_path' => 'sources/', 'remove_all_path' => TRUE);
|
||||
$zip->addGlob('*.{php,txt}', GLOB_BRACE, $options);
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
$zip = new ZipArchive();
|
||||
$ret = $zip->open('application.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE);
|
||||
if ($ret !== TRUE) {
|
||||
printf('Failed with code %d', $ret);
|
||||
printf('Falha com código %d', $ret);
|
||||
} else {
|
||||
$directory = realpath('.');
|
||||
$options = array('add_path' => 'sources/', 'remove_path' => $directory);
|
||||
|
||||
@@ -49,7 +49,7 @@ if ($zip->open('test.zip') === TRUE) {
|
||||
$zip->close();
|
||||
echo 'ok';
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -50,7 +50,7 @@ if ($zip->open('test1.zip') === TRUE) {
|
||||
$zip->close();
|
||||
echo 'ok';
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -74,7 +74,7 @@ if ($zip->open('test.zip') === TRUE) {
|
||||
$zip->close();
|
||||
echo 'ok';
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
@@ -92,7 +92,7 @@ if ($res === TRUE) {
|
||||
$zip->close();
|
||||
echo 'ok';
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -54,7 +54,7 @@ if ($res === TRUE) {
|
||||
/* Ou usando a propriedade do arquivo */
|
||||
var_dump($zip->comment);
|
||||
} else {
|
||||
echo 'failed, code:' . $res;
|
||||
echo 'falha, código:' . $res;
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -58,7 +58,7 @@ $res = $zip->open('test1.zip');
|
||||
if ($res === TRUE) {
|
||||
var_dump($zip->getCommentIndex(1));
|
||||
} else {
|
||||
echo 'failed, code:' . $res;
|
||||
echo 'falha, código:' . $res;
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -58,7 +58,7 @@ $res = $zip->open('test1.zip');
|
||||
if ($res === TRUE) {
|
||||
var_dump($zip->getCommentName('test/entry1.txt'));
|
||||
} else {
|
||||
echo 'failed, code:' . $res;
|
||||
echo 'falha, código:' . $res;
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -80,7 +80,7 @@ if ($zip->open('test.zip') === TRUE) {
|
||||
echo $zip->getFromIndex(2);
|
||||
$zip->close();
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -85,7 +85,7 @@ if ($zip->open('test1.zip') === TRUE) {
|
||||
echo $zip->getFromName('testfromfile.php');
|
||||
$zip->close();
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -48,7 +48,7 @@ $contents = '';
|
||||
$z = new ZipArchive();
|
||||
if ($z->open('test.zip')) {
|
||||
$fp = $z->getStream('test');
|
||||
if(!$fp) exit("failed\n");
|
||||
if(!$fp) exit("falha\n");
|
||||
|
||||
while (!feof($fp)) {
|
||||
$contents .= fread($fp, 2);
|
||||
@@ -56,7 +56,7 @@ if ($z->open('test.zip')) {
|
||||
|
||||
fclose($fp);
|
||||
file_put_contents('t',$contents);
|
||||
echo "done.\n";
|
||||
echo "pronto.\n";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
@@ -71,14 +71,14 @@ if ($z->open('test.zip')) {
|
||||
$contents = '';
|
||||
$fp = fopen('zip://' . dirname(__FILE__) . '/test.zip#test', 'r');
|
||||
if (!$fp) {
|
||||
exit("cannot open\n");
|
||||
exit("não foi possível abrir\n");
|
||||
}
|
||||
while (!feof($fp)) {
|
||||
$contents .= fread($fp, 2);
|
||||
}
|
||||
echo "$contents\n";
|
||||
fclose($fp);
|
||||
echo "done.\n";
|
||||
echo "pronto.\n";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
||||
@@ -69,7 +69,7 @@ $file = 'testlocate.zip';
|
||||
|
||||
$zip = new ZipArchive;
|
||||
if ($zip->open($file, ZipArchive::CREATE) !== TRUE) {
|
||||
exit('failed');
|
||||
exit('falha');
|
||||
}
|
||||
|
||||
$zip->addFromString('entry1.txt', 'entry #1');
|
||||
@@ -77,12 +77,12 @@ $zip->addFromString('entry2.txt', 'entry #2');
|
||||
$zip->addFromString('dir/entry2d.txt', 'entry #2');
|
||||
|
||||
if ($zip->status !== ZipArchive::ER_OK) {
|
||||
echo "failed to write zip\n";
|
||||
echo "falha ao escrever zip\n";
|
||||
}
|
||||
$zip->close();
|
||||
|
||||
if ($zip->open($file) !== TRUE) {
|
||||
exit('failed');
|
||||
exit('falha');
|
||||
}
|
||||
|
||||
echo $zip->locateName('entry1.txt') . "\n";
|
||||
|
||||
@@ -145,7 +145,7 @@ if ($res === TRUE) {
|
||||
$zip->extractTo('test');
|
||||
$zip->close();
|
||||
} else {
|
||||
echo 'failed, code:' . $res;
|
||||
echo 'falha, código:' . $res;
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -58,7 +58,7 @@ if ($res === TRUE) {
|
||||
$zip->renameIndex(2,'newname.txt');
|
||||
$zip->close();
|
||||
} else {
|
||||
echo 'failed, code:' . $res;
|
||||
echo 'falha, código:' . $res;
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -58,7 +58,7 @@ if ($res === TRUE) {
|
||||
$zip->renameName('currentname.txt','newname.txt');
|
||||
$zip->close();
|
||||
} else {
|
||||
echo 'failed, code:' . $res;
|
||||
echo 'falha, código:' . $res;
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -132,7 +132,7 @@ if ($zip->open('test.zip') === TRUE) {
|
||||
$zip->close();
|
||||
echo 'ok';
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -51,7 +51,7 @@ if ($res === TRUE) {
|
||||
$zip->close();
|
||||
echo 'ok';
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -74,7 +74,7 @@ if ($res === TRUE) {
|
||||
$zip->close();
|
||||
echo 'ok';
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -59,7 +59,7 @@ if ($res === TRUE) {
|
||||
$zip->close();
|
||||
echo 'ok';
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -59,7 +59,7 @@ if ($res === TRUE) {
|
||||
$zip->close();
|
||||
echo 'ok';
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -72,7 +72,7 @@ if ($res === TRUE) {
|
||||
$zip->close();
|
||||
echo 'ok';
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -72,7 +72,7 @@ if ($res === TRUE) {
|
||||
$zip->close();
|
||||
echo 'ok';
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
@@ -91,7 +91,7 @@ if ($res === TRUE) {
|
||||
$zip->close();
|
||||
echo 'ok';
|
||||
} else {
|
||||
echo 'failed';
|
||||
echo 'falha';
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -61,7 +61,7 @@ if ($res === TRUE) {
|
||||
print_r($zip->statIndex(3));
|
||||
$zip->close();
|
||||
} else {
|
||||
echo 'failed, code:' . $res;
|
||||
echo 'falha, código:' . $res;
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -79,7 +79,7 @@ if ($res === TRUE) {
|
||||
print_r($zip->statName('foobar/baz'));
|
||||
$zip->close();
|
||||
} else {
|
||||
echo 'failed, code:' . $res;
|
||||
echo 'falha, código:' . $res;
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
||||
@@ -131,9 +131,9 @@ $query = sprintf("SELECT pwd FROM users WHERE name='%s';",
|
||||
$row = pg_fetch_assoc(pg_query($connection, $query));
|
||||
|
||||
if ($row && password_verify($password, $row['pwd'])) {
|
||||
echo 'Welcome, ' . htmlspecialchars($username) . '!';
|
||||
echo 'Bem-vindo, ' . htmlspecialchars($username) . '!';
|
||||
} else {
|
||||
echo 'Authentication failed for ' . htmlspecialchars($username) . '.';
|
||||
echo 'Autenticação falhou para ' . htmlspecialchars($username) . '.';
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -157,7 +157,7 @@ if ($row && password_verify($password, $row['pwd'])) {
|
||||
<para>
|
||||
<example>
|
||||
<title>
|
||||
Dividindo o result set em páginas ... e criando super-usuários
|
||||
Dividindo o conjunto de resultados em páginas ... e criando super-usuários
|
||||
(PostgreSQL)
|
||||
</title>
|
||||
<simpara>
|
||||
|
||||
Reference in New Issue
Block a user