<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linha de comando.com - Tecnologia, Informação, Dicas e muito mais.</title>
	<atom:link href="http://www.linhadecomando.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.linhadecomando.com</link>
	<description>quem sabe eu possa te ajudar!</description>
	<lastBuildDate>Thu, 02 Feb 2012 09:42:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>PHP: Trabalhando com cookies – GET &#8211; JQuery</title>
		<link>http://www.linhadecomando.com/php/php-trabalhando-com-cookies-get-jquery</link>
		<comments>http://www.linhadecomando.com/php/php-trabalhando-com-cookies-get-jquery#comments</comments>
		<pubDate>Thu, 02 Feb 2012 09:42:53 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.linhadecomando.com/?p=2393</guid>
		<description><![CDATA[Diferente dos outros posts sobre cookies, este passa os valores selecionados, no combobox, via JQuery e depois é armazenado, através da função setcookie. &#60;? if &#40;isset&#40;$_GET&#91;'cidades'&#93;&#41;&#41;&#123; $cidades = $_GET&#91;'cidades'&#93;; setcookie&#40;&#34;cidades&#34;,$cidades,time&#40;&#41;+3600*24*30&#41;; &#125;else&#123; if &#40;isset&#40;$_COOKIE&#91;'cidades'&#93;&#41;&#41;&#123; $cidades = $_COOKIE&#91;'cidades'&#93;; &#125; &#125; echo $cidades.&#34;&#60;br /&#62;&#34;; ?&#62; &#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=utf-8&#34; /&#62; &#60;script type=&#34;text/javascript&#34; src=&#34;https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js&#34;&#62;&#60;/script&#62; &#60;script type=&#34;text/javascript&#34;&#62; $(document).ready(function() { $('#cidades').bind('change', [...]]]></description>
			<content:encoded><![CDATA[<p>Diferente dos outros posts sobre cookies, este passa os valores selecionados, no combobox, via JQuery e depois é armazenado, através da função <a href="http://www.php.net/manual/pt_BR/function.setcookie.php" title="setcookie" target="_blank">setcookie</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cidades'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$cidades</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cidades'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #990000;">setcookie</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;cidades&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$cidades</span><span style="color: #339933;">,</span><span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">3600</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">24</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cidades'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
     <span style="color: #000088;">$cidades</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cidades'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$cidades</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>	
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function() {
  $('#cidades').bind('change', function () { 
    var url = $(this).val();
    if (url != '') {
      window.location = url;
    }
    return false;
  });
});
&lt;/script&gt;
&lt;select name=&quot;cidades&quot; id=&quot;cidades&quot;&gt;
  &lt;option value=&quot;&quot; selected=&quot;selected&quot;&gt;outras cidades&lt;/option&gt;
  &lt;option value=&quot;?cidades=sao-paulo&quot;&gt;São Paulo&lt;/option&gt;
  &lt;option value=&quot;?cidades=rio-de-janeiro&quot;&gt;Rio de Janeiro&lt;/option&gt;
&lt;/select&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.linhadecomando.com/php/php-trabalhando-com-cookies-get-jquery/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: Trabalhando com cookies &#8211; POST</title>
		<link>http://www.linhadecomando.com/php/php-trabalhando-com-cookies-post</link>
		<comments>http://www.linhadecomando.com/php/php-trabalhando-com-cookies-post#comments</comments>
		<pubDate>Thu, 02 Feb 2012 09:37:27 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[setcookie]]></category>
		<category><![CDATA[submit]]></category>

		<guid isPermaLink="false">http://www.linhadecomando.com/?p=2391</guid>
		<description><![CDATA[Os dados a serem armazenados são passados via POST. &#60;? if &#40;isset&#40;$_POST&#91;'cidades'&#93;&#41;&#41;&#123; $cidades = $_POST&#91;'cidades'&#93;; setcookie&#40;&#34;cidades&#34;,$cidades,time&#40;&#41;+3600*24*30&#41;; &#125;else&#123; if &#40;isset&#40;$_COOKIE&#91;'cidades'&#93;&#41;&#41;&#123; $cidades = $_COOKIE&#91;'cidades'&#93;; &#125; &#125; &#160; echo $cidades; ?&#62; &#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=utf-8&#34; /&#62; &#60;form name=&#34;frm1&#34; method=&#34;post&#34; action=&#34;&#34;&#62; &#60;select name=&#34;cidades&#34;&#62; &#60;option value=&#34;&#34; selected=&#34;selected&#34;&#62;outras cidades&#60;/option&#62; &#60;option value=&#34;sao-paulo&#34;&#62;São Paulo&#60;/option&#62; &#60;option value=&#34;rio-de-janeiro&#34;&#62;Rio de Janeiro&#60;/option&#62; &#60;/select&#62; &#60;input type=&#34;submit&#34; name=&#34;enviar&#34; value=&#34;ENVIAR&#34;&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Os dados a serem armazenados são passados via POST.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cidades'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$cidades</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cidades'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #990000;">setcookie</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;cidades&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$cidades</span><span style="color: #339933;">,</span><span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">3600</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">24</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cidades'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
     <span style="color: #000088;">$cidades</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cidades'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$cidades</span><span style="color: #339933;">;</span>	
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;form name=&quot;frm1&quot; method=&quot;post&quot; action=&quot;&quot;&gt;
  &lt;select name=&quot;cidades&quot;&gt;
    &lt;option value=&quot;&quot; selected=&quot;selected&quot;&gt;outras cidades&lt;/option&gt;
    &lt;option value=&quot;sao-paulo&quot;&gt;São Paulo&lt;/option&gt;
    &lt;option value=&quot;rio-de-janeiro&quot;&gt;Rio de Janeiro&lt;/option&gt;
  &lt;/select&gt;
  &lt;input type=&quot;submit&quot; name=&quot;enviar&quot; value=&quot;ENVIAR&quot;&gt;
&lt;/form&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.linhadecomando.com/php/php-trabalhando-com-cookies-post/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: Trabalhando com cookies &#8211; GET</title>
		<link>http://www.linhadecomando.com/php/php-trabalhando-com-cookies-get</link>
		<comments>http://www.linhadecomando.com/php/php-trabalhando-com-cookies-get#comments</comments>
		<pubDate>Thu, 02 Feb 2012 09:33:14 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[setcookie]]></category>

		<guid isPermaLink="false">http://www.linhadecomando.com/?p=2389</guid>
		<description><![CDATA[Olá pessoal, beleza! Aprenda neste post como trabalhar com cookies. Os cookies são uma forma prática de guardar informações de acesso (login), de navegação, de filtros de busca etc. Os cookies permitem que os dados guardados sejam mantidos por um determinado tempo; se não for informado este tempo, ao fechar o navegador os dados são [...]]]></description>
			<content:encoded><![CDATA[<p>Olá pessoal, beleza!</p>
<p>Aprenda neste post como trabalhar com cookies.</p>
<p>Os cookies são uma forma prática de guardar informações de acesso (login), de navegação, de filtros de busca etc.</p>
<p>Os cookies permitem que os dados guardados sejam mantidos por um determinado tempo; se não for informado este tempo, ao fechar o navegador os dados são perdidos.</p>
<p>&#8220;Os cookies são uma parte do cabeçalho HTTP, logo <a href="http://www.php.net/manual/pt_BR/function.setcookie.php" title="setcookie" target="_blank">setcookie()</a> precisa ser chamada antes que qualquer outro dado seja enviado ao navegador.&#8221;</p>
<p>O 3º parâmetro da função setcookie trata-se do tempo de expiração, em segundos. Você deve trabalhar em conjunto com a função time().</p>
<p>3600*24*30 = equivale a 30 dias</p>
<p>3600*24*30*16 = equivale a 6 meses</p>
<p>3600*24*30*12*6 = equivale a 6 anos</p>
<p>Os dados a serem armazenados são passados via GET.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cidades'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$cidades</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cidades'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #990000;">setcookie</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;cidades&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$cidades</span><span style="color: #339933;">,</span><span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">3600</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">24</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cidades'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
     <span style="color: #000088;">$cidades</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cidades'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$cidades</span><span style="color: #339933;">;</span>	
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;table border=&quot;0&quot;&gt;
&lt;tr&gt;
   &lt;td&gt;&lt;a href=&quot;?cidades=sao-paulo&quot;&gt;São Paulo&lt;/a&gt;&lt;/td&gt;
   &lt;td&gt;&lt;a href=&quot;?cidades=rio-de-janeiro&quot;&gt;Rio de Janeiro&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.linhadecomando.com/php/php-trabalhando-com-cookies-get/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL: Renomeando nome da tabela</title>
		<link>http://www.linhadecomando.com/mysql/mysql-renomeando-nome-da-tabela</link>
		<comments>http://www.linhadecomando.com/mysql/mysql-renomeando-nome-da-tabela#comments</comments>
		<pubDate>Tue, 24 Jan 2012 12:00:58 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[alter table]]></category>
		<category><![CDATA[rename]]></category>

		<guid isPermaLink="false">http://www.linhadecomando.com/?p=2387</guid>
		<description><![CDATA[RENAME TABLE old_tabela TO new_tabela; Para renomear tabelas temporárias use essa forma: ALTER TABLE old_tabela RENAME new_tabela;]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;">  <span style="color: #990099; font-weight: bold;">RENAME</span> <span style="color: #990099; font-weight: bold;">TABLE</span> old_tabela <span style="color: #990099; font-weight: bold;">TO</span> new_tabela<span style="color: #000033;">;</span></pre></div></div>

<p>Para renomear tabelas temporárias use essa forma:</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;">  <span style="color: #990099; font-weight: bold;">ALTER</span> <span style="color: #990099; font-weight: bold;">TABLE</span> old_tabela <span style="color: #990099; font-weight: bold;">RENAME</span> new_tabela<span style="color: #000033;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.linhadecomando.com/mysql/mysql-renomeando-nome-da-tabela/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dicas de Site: Modernizando seus formulários</title>
		<link>http://www.linhadecomando.com/dica-de-site/dicas-de-site-modernizando-seus-formularios</link>
		<comments>http://www.linhadecomando.com/dica-de-site/dicas-de-site-modernizando-seus-formularios#comments</comments>
		<pubDate>Mon, 23 Jan 2012 11:27:20 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[Dicas de Site]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://www.linhadecomando.com/?p=2384</guid>
		<description><![CDATA[Dicas de sites que prometem te ajudar na hora de criar formulários para o seu site. http://www.formee.org/ http://uniformjs.com/ http://twitter.github.com/bootstrap/]]></description>
			<content:encoded><![CDATA[<p>Dicas de sites que prometem te ajudar na hora de criar formulários para o seu site.</p>
<p><a href="http://www.formee.org/" title="Formee" target="_blank">http://www.formee.org/</a><br />
<img src="/wp-content/uploads/img-formee.jpg" border="0" /></p>
<p><a href="http://uniformjs.com/" title="Uniform" target="_blank">http://uniformjs.com/</a><br />
<img src="/wp-content/uploads/img-uniform.jpg" border="0" /></p>
<p><a href="http://twitter.github.com/bootstrap/" target="_blank">http://twitter.github.com/bootstrap/</a><br />
<img src="/wp-content/uploads/img-bootstrap.jpg" border="0" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linhadecomando.com/dica-de-site/dicas-de-site-modernizando-seus-formularios/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: Exibindo fotos de um diretório de forma descendente</title>
		<link>http://www.linhadecomando.com/php/php-exibindo-fotos-de-um-diretorio-de-forma-descendente</link>
		<comments>http://www.linhadecomando.com/php/php-exibindo-fotos-de-um-diretorio-de-forma-descendente#comments</comments>
		<pubDate>Fri, 20 Jan 2012 09:55:53 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[scandir]]></category>

		<guid isPermaLink="false">http://www.linhadecomando.com/?p=2377</guid>
		<description><![CDATA[Mais um post para o linhadecomando.com. Para este post vamos utilizar a funcção scandir. Objetivo: mostrar os arquivos de imagem (fotos) que estão em um diretório de forma descendente. &#60;? $dir = &#34;fotos/&#34;; $files = scandir&#40;$dir,1&#41;; foreach &#40;$files as $file&#41;&#123; // diretório + nome do arquivo de imagem $caminho_completo = $dir.$file; // eliminando o '.' [...]]]></description>
			<content:encoded><![CDATA[<p>Mais um post para o linhadecomando.com.</p>
<p>Para este post vamos utilizar a funcção <a href="http://php.net/manual/pt_BR/function.scandir.php" title="Scandir" target="_blank">scandir</a>.</p>
<p><strong>Objetivo</strong>: mostrar os arquivos de imagem (fotos) que estão em um diretório de forma descendente.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
  <span style="color: #000088;">$dir</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;fotos/&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$files</span> <span style="color: #339933;">=</span> <span style="color: #990000;">scandir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$files</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
     <span style="color: #666666; font-style: italic;">// diretório + nome do arquivo de imagem</span>
     <span style="color: #000088;">$caminho_completo</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dir</span><span style="color: #339933;">.</span><span style="color: #000088;">$file</span><span style="color: #339933;">;</span>
     <span style="color: #666666; font-style: italic;">// eliminando o '.' e '..'</span>
     <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'.'</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$file</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'..'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;img src='<span style="color: #006699; font-weight: bold;">{$caminho_completo}</span>' alt='Fotos' /&gt;&quot;</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span>	
   <span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Para exibir de forma descendente, basta utilizar o segundo parâmetro da função scandir:<br />
0 &#8211; ascendente / 1 &#8211; descendente</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linhadecomando.com/php/php-exibindo-fotos-de-um-diretorio-de-forma-descendente/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux: Reiniciando um servidor</title>
		<link>http://www.linhadecomando.com/so-linux/linux-reiniciando-um-servidor</link>
		<comments>http://www.linhadecomando.com/so-linux/linux-reiniciando-um-servidor#comments</comments>
		<pubDate>Wed, 18 Jan 2012 09:31:59 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.linhadecomando.com/?p=2372</guid>
		<description><![CDATA[comando a ser executado via SSH: shutdown -r now msg: The system is going down for reboot NOW! Sua conexão será encerrada, sendo necessário uma nova conexão. Verifique se tudo está funcionando normalmente. Boa sorte!]]></description>
			<content:encoded><![CDATA[<p><em>comando a ser executado via SSH</em>:</p>
<p><strong>shutdown -r now</strong></p>
<p>msg: The system is going down for reboot NOW!</p>
<p>Sua conexão será encerrada, sendo necessário uma nova conexão.</p>
<p>Verifique se tudo está funcionando normalmente.</p>
<p>Boa sorte!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linhadecomando.com/so-linux/linux-reiniciando-um-servidor/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Séries de Web: Menus &#8211; Destacando um item do menu</title>
		<link>http://www.linhadecomando.com/series-de-web/series-de-web-menus-destacando-um-item-do-menu</link>
		<comments>http://www.linhadecomando.com/series-de-web/series-de-web-menus-destacando-um-item-do-menu#comments</comments>
		<pubDate>Mon, 16 Jan 2012 11:16:50 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[Menus]]></category>
		<category><![CDATA[Séries de Web]]></category>

		<guid isPermaLink="false">http://www.linhadecomando.com/?p=2363</guid>
		<description><![CDATA[Uma forma simples de destacar um item de menu. O conteúdo do arquivo conteudo.php pode ser acessado aqui. &#60;? $menuativo = $_GET&#91;'acessando'&#93;; ?&#62; &#60;html&#62; &#60;head&#62; &#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=utf-8&#34; /&#62; &#60;title&#62;Destacando item de menu&#60;/title&#62; &#60;style type=&#34;text/css&#34;&#62; #menu { height:40px;font-size:16px;} #menu ul li{ list-style: none outside none; } #menu li { display:inline;float:left;text-align:center} #menu li a{ padding:6px;text-decoration:none; [...]]]></description>
			<content:encoded><![CDATA[<p>Uma forma simples de destacar um item de menu.</p>
<p>O conteúdo do arquivo conteudo.php pode ser <a href="http://www.linhadecomando.com/php/php-carregando-conteudo-dentro-de-um-div" title="Carregando conteúdo">acessado aqui</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span> <span style="color: #000088;">$menuativo</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'acessando'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
&lt;title&gt;Destacando item de menu&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
#menu { height:40px;font-size:16px;}
#menu ul li{ list-style: none outside none; }
#menu li { display:inline;float:left;text-align:center}
#menu li a{ padding:6px;text-decoration:none; color:#000; }
#menu li a:hover, #menu li a.ativo { color:#88A25D; }
#menu li.home a{color:#FFF;background-color:#336699}
#menu li.home a:hover{ color:#FF0000; }
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;menu&quot;&gt;
 &lt;ul&gt;
  &lt;li class=&quot;home&quot;&gt;&lt;a href=&quot;?acessando=Home&quot;&gt;INÍCIO&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;?acessando=Empresa&quot; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menuativo</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'Empresa'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;class='ativo'&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;EMPRESA&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;?acessando=Contato&quot; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$menuativo</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'Contato'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;class='ativo'&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;CONTATO&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div id=&quot;conteudo&quot;&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?</span> <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;conteudo.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.linhadecomando.com/series-de-web/series-de-web-menus-destacando-um-item-do-menu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: Carregando conteúdo dentro de um div</title>
		<link>http://www.linhadecomando.com/php/php-carregando-conteudo-dentro-de-um-div</link>
		<comments>http://www.linhadecomando.com/php/php-carregando-conteudo-dentro-de-um-div#comments</comments>
		<pubDate>Mon, 16 Jan 2012 11:06:43 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.linhadecomando.com/?p=2366</guid>
		<description><![CDATA[&#8211; index.php &#60;div id=&#34;top&#34;&#62;&#60;/div&#62; &#60;div id=&#34;menu&#34;&#62;&#60;/div&#62; &#60;div id=&#34;main&#34;&#62; &#60;? include&#40;&#34;conteudo.php&#34;&#41;; ?&#62; &#60;/div&#62; &#60;div id=&#34;footer&#34;&#62;&#60;/div&#62; &#8211; conteudo.php &#60;? $pagina = $_GET&#91;'acessando'&#93;; if&#40;$pagina==''&#41; include &#40;'principal.html'&#41;; elseif&#40;file_exists&#40;$pagina.'.html'&#41;&#41;&#123; include &#40;$pagina.'.html'&#41;; &#125; elseif&#40;file_exists&#40;$pagina.'.php'&#41;&#41;&#123; include &#40;$pagina.'.php'&#41;; &#125; else include &#40;'principal.html'&#41;; ?&#62;]]></description>
			<content:encoded><![CDATA[<p>&#8211; index.php</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;top&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;main&quot;</span>&gt;</span>
   <span style="color: #009900;">&lt;? include<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;conteudo.php&quot;</span><span style="color: #66cc66;">&#41;</span>; ?&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;footer&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>&#8211; conteudo.php</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #000088;">$pagina</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'acessando'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pagina</span><span style="color: #339933;">==</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span>
  <span style="color: #b1b100;">include</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'principal.html'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pagina</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.html'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">include</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$pagina</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.html'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>		
<span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pagina</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.php'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">include</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$pagina</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> 
  <span style="color: #b1b100;">include</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'principal.html'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.linhadecomando.com/php/php-carregando-conteudo-dentro-de-um-div/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vídeos: Celebre a  juventude &#8211; Entenda as gerações</title>
		<link>http://www.linhadecomando.com/videos/videos-celebre-a-juventude-entenda-as-geracoes</link>
		<comments>http://www.linhadecomando.com/videos/videos-celebre-a-juventude-entenda-as-geracoes#comments</comments>
		<pubDate>Wed, 11 Jan 2012 09:59:09 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[Vídeos]]></category>

		<guid isPermaLink="false">http://www.linhadecomando.com/?p=2356</guid>
		<description><![CDATA[Gerações: Geração Boomer (46 a 64) Geração X (de 65 a 76) Geração Y (1977 a 1997) Geração Z (segunda metade da década de 90 até os dias de hoje) Vale a pena assistir:]]></description>
			<content:encoded><![CDATA[<p><strong>Gerações</strong>:</p>
<p>Geração Boomer (46 a 64)<br />
Geração X (de 65 a 76)<br />
Geração Y (1977 a 1997)<br />
Geração Z (segunda metade da década de 90 até os dias de hoje)</p>
<p>Vale a pena assistir:</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/52e7i-2D6HU" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linhadecomando.com/videos/videos-celebre-a-juventude-entenda-as-geracoes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

