Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

João C. Neto

WAMP Problema na Execução do PHP

Recommended Posts

Instalei o WAMP na minha maquina e esta ocorrendo algo estranho.

Quando vou rodar qulquer sistema pelo http://localhost do WAP

ele rodao HTML e exibe na tela os pedaços ou ate mesmo todo o código fonte PHP quando no entanto era para ele mostrar o resultado do processamento daquele código.

 

Ex:

 

javascript:window.location=\"index.php\";alert('Arquivo apagado com sucesso, Seja bem Vindo ao Iogurt!');"; } } //Tabela Bugs $table_bugs = "CREATE TABLE `bugs` (`id` bigint(20) NOT NULL auto_increment, `header` blob NOT NULL, `ip` varchar(100) NOT NULL default '', `message` varchar(200) NOT NULL default '', `date` datetime NOT NULL default '0000-00-00 00:00:00', `user` bigint(20) NOT NULL default '0', `form` blob NOT NULL, `querystring` blob NOT NULL, `confirmed` int(11) NOT NULL default '0', PRIMARY KEY (`id`)) TYPE=MyISAM;"; $result = mysql_query($table_bugs) or die("Ocorreu um erro no Mysql.\n
Diagnóstico: " . $query . "
\nError: (" . mysql_errno() . ") " . mysql_error()); print "."; // Tabela comunidade $table_comunidade = "CREATE TABLE `comunidade` (`id` bigint(20) NOT NULL auto_increment, `nome` varchar(100) NOT NULL default '', `descricao` varchar(200) NOT NULL, `anonimo` tinyint(1) NOT NULL default '0', `publico` tinyint(1) NOT NULL default '0', `localizacao` int(11) default '0', `categoria` int(11) NOT NULL default '0', `dono` bigint(20) NOT NULL default '0', `data_criacao` datetime NOT NULL default '00-00-0000 00:00:00', PRIMARY KEY (`id`)) TYPE=MyISAM;"; $result = mysql_query($table_comunidade) or die("Ocorreu um erro no Mysql.\n
Diagnóstico: " . $query . "
\nError: (" . mysql_errno() . ") " . mysql_error()); print "."; // Tabela comunidade_categoria $table_comunidade_categoria = "CREATE TABLE `comunidade_categoria` (`id` int(11) NOT NULL default '0', `nome` varchar(100) NOT NULL default '', PRIMARY KEY (`id`)) TYPE=MyISAM;"; $result = mysql_query($table_comunidade_categoria) or die("Ocorreu um erro no Mysql.\n
Diagnóstico: " . $query . "
\nError: (" . mysql_errno() . ") " . mysql_error()); print "."; // Inserir dados em comunidade_cat... $table_inscomunidadecat = "INSERT INTO `comunidade_categoria` VALUES(1,'Outros');"; $result = mysql_query($table_inscomunidadecat) or die("Ocorreu um erro no Mysql.\n
Diagnóstico: " . $query . "
\nError: (" . mysql_errno() . ") " . mysql_error()); print "."; // Tabela `comunidade_eventos` $table_comunidade_eventos = "CREATE TABLE `comunidade_eventos`( `id` bigint(20) NOT NULL auto_increment, `comunidade` bigint(20) NOT NULL default '0', `titulo` varchar(80) NOT NULL default '', `descricao` blob NOT NULL, `data` datetime NOT NULL default '0000-00-00 00:00:00', `localizacao1` varchar(100) NOT NULL default '', `locatizacao2` varchar(100) NOT NULL default '', `parent` bigint(20) default '0', `criador` bigint(20) NOT NULL default '0', PRIMARY KEY (`id`)) TYPE=MyISAM;"; $result = mysql_query($table_comunidade_eventos) or die("Ocorreu um erro no Mysql.\n
Diagnóstico: " . $query . "
\nError: (" . mysql_errno() . ") " . mysql_error()); print "."; // Tabela `comunidade_msg` $table_comunidade_msg = "CREATE TABLE `comunidade_msg`(`id` bigint(20) NOT NULL auto_increment, `comunidade` bigint(20) NOT NULL default '0', `parent` bigint(20) default '0', `titulo` varchar(100) NOT NULL default '', `msg` blob NOT NULL, `env` bigint(20) NOT NULL default '0', `data` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) TYPE=MyISAM;"; $result = mysql_query($table_comunidade_msg) or die("Ocorreu um erro no Mysql.\n
Diagnóstico: " . $query . "
\nError: (" . mysql_errno() . ") " . mysql_error()); print "."; // Tabela `comunidade_usuarios` $table_comunidade_usuarios = "CREATE TABLE `comunidade_usuarios`(`comunidade` bigint(20) NOT NULL default '0', `usuario` bigint(20) NOT NULL default '0', `moderador` tinyint(11) NOT NULL default '0', `aprovado` tinyint(1) NOT NULL default '0') TYPE=MyISAM;"; $result = mysql_query($table_comunidade_usuarios) or die("Ocorreu um erro no Mysql.\n
Diagnóstico: " . $query . "
\nError: (" . mysql_errno() . ") " . mysql_error()); print "."; // Tabela `cidades` $table_cidades = "CREATE TABLE `cidades`(`id` bigint(20) NOT NULL auto_increment, `nome` varchar(100) default '', `codigo` varchar(50) default '', PRIMARY KEY (`id`)) TYPE=MyISAM;"; $result = mysql_query($table_cidades) or die("Ocorreu um erro no Mysql.\n
Diagnóstico: " . $query . "
\nError: (" . mysql_errno() . ") " . mysql_error()); print "."; // Adicionando dados em cidades // $table_addcidades = "INSERT INTO `cidades` VALUES(1,`Brasil`,`9BR`);"; // $result = mysql_query($table_addcidades) or die("Ocorreu um erro no Mysql.\n
Diagnóstico: " . $query . "
\nError: (" . mysql_errno() . ") " . mysql_error()); // print "Foi inserido dados em `cidades` com sucesso!
\n"; // Tabela recados $table_recados = "CREATE TABLE `recados` (`id` bigint(20) NOT NULL auto_increment,`msg` varchar(200) NOT NULL default '',`env` bigint(20) NOT NULL default '0',`dest` bigint(20) NOT NULL default '0',`data` datetime NOT NULL default '00-00-0000 00:00:00',`sistema` tinyint(1) NOT NULL default '1',`visto` tinyint(1) NOT NULL default '0',PRIMARY KEY (`id`)) TYPE=MyISAM;"; $result = mysql_query($table_recados) or die("Ocorreu um erro no Mysql.\n
Diagnóstico: " . $query . "
\nError: (" . mysql_errno() . ") " . mysql_error()); print "."; // Tabela amigos $table_amigos = "CREATE TABLE `amigos` (`usuario` bigint(20) NOT NULL default '0', `amigo` bigint(20) NOT NULL default '0',`aprovado` smallint(1) NOT NULL default '0',`nivel` int(1) NOT NULL default '3') TYPE=MyISAM;"; $result = mysql_query($table_amigos) or die("Ocorreu um erro no Mysql.\n
Diagnóstico: " . $query . "
\nError: (" . mysql_errno() . ") " . mysql_error()); print "."; // Tabela usuários $table_usuarios = "CREATE TABLE `usuarios` (`id` bigint(20) NOT NULL auto_increment,`usuario` varchar(20) NOT NULL default '',`senha` varchar(20) NOT NULL default '',`nome` varchar(20) NOT NULL default '',`estatus` int(1) default '0',`sexo` int(1) default '0',`looking_friends` tinyint(1) NOT NULL default '0',`looking_business` tinyint(1) NOT NULL default '0',`looking_dating` tinyint(1) NOT NULL default '0',`dating_type` int(11) default '0',`cidade` bigint(20) default '0',`ultimo_login` datetime NOT NULL default '0000-00-00 00:00:00',`atual_login` datetime NOT NULL default '0000-00-00 00:00:00',`sobre_mim` blob,`email` varchar(60) default '',PRIMARY KEY (`id`,`usuario`), UNIQUE KEY id (`id`), UNIQUE KEY id_2 (`id`), UNIQUE KEY id_3 (`id`)) TYPE=MyISAM;"; $result = mysql_query($table_usuarios) or die("Ocorreu um erro no Mysql.\n
Diagnóstico: " . $query . "
\nError: (" . mysql_errno() . ") " . mysql_error()); print "."; mysql_close(); if($table_usuarios) { ?>

 

Quando no entanto era apenas para ele criar as tabelas sem mostrar esses códigos.

 

Alguém pode me ajudar?

 

Desde já muito obrigado.

Compartilhar este post


Link para o post
Compartilhar em outros sites

testa o famoso alô mundo;

 

cria um arquivo com qualquer nome e digita o seguinte:

 

<?php

 

echo 'alô mundo';

 

?>

 

se der tudo certo vai aparecer apenas alô mundo, senão refaça a instalação do Wamp.

Compartilhar este post


Link para o post
Compartilhar em outros sites

testa o famoso alô mundo;

 

cria um arquivo com qualquer nome e digita o seguinte:

 

<?php

 

echo 'alô mundo';

 

?>

 

se der tudo certo vai aparecer apenas alô mundo, senão refaça a instalação do Wamp.

 

Olá, primeiro obrigado por tentar ajudar.

 

Olha, o alô mundo pega corretamente.

Agora aplicações maiores da exibindo o código fonte como mostrado no tópico anterior.

Compartilhar este post


Link para o post
Compartilhar em outros sites
<?
/*
* 12/19/2006 - 09:04:11
*
* Iogurt - Rede de Amigos
* Copyright (C) 2006 Diego Vieira Dias
* diego@iogurt.org
* Ao colocarem postes irei colocar nome e email aqui.
* http://www.iogurt.org
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/

// inclui o tema

include("tema.php");

// cria a parte superior do tema

draw_top();
?>
<?
// Equipe - Iogurt
// Bom esta é parte mais importante do projeto, aqui se encontra o Banco de Dados, é um script bem simples e o fiz para facilitar a criação do banco de dados, Ele cria automáticamente o BD.
// Chama a conexão do BD

require_once ("sis/config.php");
require_once ("sis/conexao.php");

if($acao=="apagar")
{
if(file_exists("instalar.php"))
{
	@unlink("instalar.php");
	echo"<script>javascript:window.location=\"index.php\";alert('Arquivo apagado com sucesso, Seja bem Vindo ao Iogurt!');</script>";
}
}

//Tabela Bugs

$table_bugs = "CREATE TABLE `bugs` (`id` bigint(20) NOT NULL auto_increment, `header` blob NOT NULL, `ip` varchar(100) NOT NULL default '',  `message` varchar(200) NOT NULL default '',  `date` datetime NOT NULL default '0000-00-00 00:00:00',  `user` bigint(20) NOT NULL default '0', `form` blob NOT NULL, `querystring` blob NOT NULL, `confirmed` int(11) NOT NULL default '0', PRIMARY KEY  (`id`)) TYPE=MyISAM;";
$result = mysql_query($table_bugs) or die("<b>Ocorreu um erro no Mysql</b>.\n<br />Diagnóstico: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
print ".";

// Tabela comunidade

$table_comunidade = "CREATE TABLE `comunidade` (`id` bigint(20) NOT NULL auto_increment, `nome` varchar(100) NOT NULL default '', `descricao` varchar(200) NOT NULL, `anonimo` tinyint(1) NOT NULL default '0',  `publico` tinyint(1) NOT NULL default '0',  `localizacao` int(11) default '0', `categoria` int(11) NOT NULL default '0', `dono` bigint(20) NOT NULL default '0', `data_criacao` datetime NOT NULL default '00-00-0000 00:00:00', PRIMARY KEY  (`id`)) TYPE=MyISAM;";
$result = mysql_query($table_comunidade) or die("<b>Ocorreu um erro no Mysql</b>.\n<br />Diagnóstico: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
print ".";

// Tabela comunidade_categoria

$table_comunidade_categoria = "CREATE TABLE `comunidade_categoria` (`id` int(11) NOT NULL default '0', `nome` varchar(100) NOT NULL default '', PRIMARY KEY  (`id`)) TYPE=MyISAM;";
$result = mysql_query($table_comunidade_categoria) or die("<b>Ocorreu um erro no Mysql</b>.\n<br />Diagnóstico: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
print ".";

// Inserir dados em comunidade_cat...

$table_inscomunidadecat = "INSERT INTO `comunidade_categoria` VALUES(1,'Outros');";
$result = mysql_query($table_inscomunidadecat) or die("<b>Ocorreu um erro no Mysql</b>.\n<br />Diagnóstico: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
print ".";

// Tabela `comunidade_eventos`

$table_comunidade_eventos = "CREATE TABLE `comunidade_eventos`( `id` bigint(20) NOT NULL auto_increment, `comunidade` bigint(20) NOT NULL default '0', `titulo` varchar(80) NOT NULL default '',  `descricao` blob NOT NULL, `data` datetime NOT NULL default '0000-00-00 00:00:00', `localizacao1` varchar(100) NOT NULL default '', `locatizacao2` varchar(100) NOT NULL default '', `parent` bigint(20) default '0', `criador` bigint(20) NOT NULL default '0', PRIMARY KEY  (`id`)) TYPE=MyISAM;";
$result = mysql_query($table_comunidade_eventos) or die("<b>Ocorreu um erro no Mysql</b>.\n<br />Diagnóstico: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
print ".";

// Tabela `comunidade_msg`

$table_comunidade_msg = "CREATE TABLE `comunidade_msg`(`id` bigint(20) NOT NULL auto_increment, `comunidade` bigint(20) NOT NULL default '0', `parent` bigint(20) default '0', `titulo` varchar(100) NOT NULL default '', `msg` blob NOT NULL,  `env` bigint(20) NOT NULL default '0',  `data` datetime NOT NULL default '0000-00-00 00:00:00',  PRIMARY KEY  (`id`)) TYPE=MyISAM;";
$result = mysql_query($table_comunidade_msg) or die("<b>Ocorreu um erro no Mysql</b>.\n<br />Diagnóstico: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
print ".";

// Tabela `comunidade_usuarios`

$table_comunidade_usuarios = "CREATE TABLE `comunidade_usuarios`(`comunidade` bigint(20) NOT NULL default '0', `usuario` bigint(20) NOT NULL default '0', `moderador` tinyint(11) NOT NULL default '0', `aprovado` tinyint(1) NOT NULL default '0') TYPE=MyISAM;";
$result = mysql_query($table_comunidade_usuarios) or die("<b>Ocorreu um erro no Mysql</b>.\n<br />Diagnóstico: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
print ".";

// Tabela `cidades`

$table_cidades = "CREATE TABLE `cidades`(`id` bigint(20) NOT NULL auto_increment, `nome` varchar(100) default '', `codigo` varchar(50) default '', PRIMARY KEY  (`id`)) TYPE=MyISAM;";
$result = mysql_query($table_cidades) or die("<b>Ocorreu um erro no Mysql</b>.\n<br />Diagnóstico: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
print ".";

// Adicionando dados em cidades

// $table_addcidades = "INSERT INTO `cidades` VALUES(1,`Brasil`,`9BR`);";
// $result = mysql_query($table_addcidades) or die("<b>Ocorreu um erro no Mysql</b>.\n<br />Diagnóstico: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
// print "Foi inserido dados em `cidades` com sucesso!<br>\n";

// Tabela recados

$table_recados = "CREATE TABLE `recados` (`id` bigint(20) NOT NULL auto_increment,`msg` varchar(200) NOT NULL default '',`env` bigint(20) NOT NULL default '0',`dest` bigint(20) NOT NULL default '0',`data` datetime NOT NULL default '00-00-0000 00:00:00',`sistema` tinyint(1) NOT NULL default '1',`visto` tinyint(1) NOT NULL default '0',PRIMARY KEY  (`id`)) TYPE=MyISAM;";
$result = mysql_query($table_recados) or die("<b>Ocorreu um erro no Mysql</b>.\n<br />Diagnóstico: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
print ".";

// Tabela amigos

$table_amigos = "CREATE TABLE `amigos` (`usuario` bigint(20) NOT NULL default '0', `amigo` bigint(20) NOT NULL default '0',`aprovado` smallint(1) NOT NULL default '0',`nivel` int(1) NOT NULL default '3') TYPE=MyISAM;";
$result = mysql_query($table_amigos) or die("<b>Ocorreu um erro no Mysql</b>.\n<br />Diagnóstico: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
print ".";

// Tabela usuários

$table_usuarios = "CREATE TABLE `usuarios` (`id` bigint(20) NOT NULL auto_increment,`usuario` varchar(20) NOT NULL default '',`senha` varchar(20) NOT NULL default '',`nome` varchar(20) NOT NULL default '',`estatus` int(1) default '0',`sexo` int(1) default '0',`looking_friends` tinyint(1) NOT NULL default '0',`looking_business` tinyint(1) NOT NULL default '0',`looking_dating` tinyint(1) NOT NULL default '0',`dating_type` int(11) default '0',`cidade` bigint(20) default '0',`ultimo_login` datetime NOT NULL default '0000-00-00 00:00:00',`atual_login` datetime NOT NULL default '0000-00-00 00:00:00',`sobre_mim` blob,`email` varchar(60) default '',PRIMARY KEY  (`id`,`usuario`),  UNIQUE KEY id (`id`),  UNIQUE KEY id_2 (`id`),  UNIQUE KEY id_3 (`id`)) TYPE=MyISAM;";
$result = mysql_query($table_usuarios) or die("<b>Ocorreu um erro no Mysql</b>.\n<br />Diagnóstico: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error());
print ".";

mysql_close();
if($table_usuarios)
{
?>
<html>
<head>
<title>Instalado com sucesso!</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="estilos.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="547" border="0" align="center" cellpadding="0" cellspacing="0">
 <tr> 
   <td><p align="center"><font color="#333333" size="6" face="Verdana, Arial, Helvetica, sans-serif"><strong>Instalado 
       com sucesso!</strong></font></p>
     <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Para que 
     o sistema funcione corretamente,</font></p>
     <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">        <strong><font color="#FF0000">Apagar</font></strong> 
       esse arquivo (instalar.php), após efetuar a instalação.</font></p>
     <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">        </font><font size="2">[<font face="Verdana, Arial, Helvetica, sans-serif"><a href="?acao=apagar">Clique 
       aqui para apagar o arquivo</a></font>] </font></p>
     <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Equipe - Iogurt</font></p></td>
 </tr>
</table>
</body>
</html>
<? 
}else{ 
echo"<font face=\"Tahoma\" size=\"2\">";
echo"<u>Erro</u>: Ocorreu um erro ao criar instalar o sistema.<br>";
echo"Verifique se o arquivo: config.php (sis/config.php) foi configurado corretamente";
echo"</font>";
} 
?>
<?
draw_bottom();
?>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Provavelmente o arquivo de configuração do seu PHP está setado para não aceitar short tags.

 

Teste usando as tags normais para abrir e fechar o código PHP;

 

 

 

 

<?php

...........

código php

..........

?> 

 

 

Compartilhar este post


Link para o post
Compartilhar em outros sites

Botão Direito (Icone WAMP) > PHP > Opções PHP > short open tag (tem que ficar com um tick na frete)

 

Simples assim habilita.

 

Quanto ao comentário do Rodrigo Zanotta, eu sou um que uso a muitos anos short open tag.

 

E não é teimosia e nem preguiça é simplicidade, já fiz site e diversos servidores e nunca precisei que ninguém habilita-se isso para mim, e muitos servers permitem que você crie seu proprio php.ini no diretório do site para alterar as configurações do php.

 

 

Enquanto você quer imprimir uma variável sem short open tag você faz isso.

<strong><?php echo $variavel; ?></strong>

 

Eu só faço isso

<strong><?=$variavel?></strong>

 

Não precisa nem de ";" no final. (Evita erros bobos ao imprimir variaveis)

 

Um ternário é a mesma coisa.

<strong><? echo empty($variavel) ? 'inativo' : 'ativo' ; ?></strong>

<strong><?=empty($variavel) ? 'inativo' : 'ativo'?></strong>

 

 

Isso em um código html muito extenso da muita diferença na compreensão e agilidade do código.

 

Antes


<tr>
   <td><a href="<?php echo $URL->site; ?>painel/contatos/perfil/<?php echo $contato['keycode_contato']; ?>" target="_blank"><strong><?php echo $contato['nome']; ?></strong></a><br />
   <?php echo ($contato['email'] != '') ? "<strong>E-mail:</strong> {$contato['email']}" : "" ; ?>
   </td>
   <td class="orderBy"><?php echo $contato['lideranca']; ?></td>
   <td><?php echo $contato['nivel']; ?></td>
   <td><?php echo $contato['data_cadastro']; ?></td>
   <td><?php echo $contato['data_nascimento']; ?></td>
</tr>

 

Depois


<tr>
   <td><a href="<?=$URL->site?>painel/contatos/perfil/<?=$contato['keycode_contato']?>" target="_blank"><strong><?=$contato['nome']?></strong></a><br />
   <?=($contato['email'] != '') ? "<strong>E-mail:</strong> {$contato['email']}" : "" ?>
   </td>
   <td class="orderBy"><?=$contato['lideranca']?></td>
   <td><?=$contato['nivel']?></td>
   <td><?=$contato['data_cadastro']?></td>
   <td><?=$contato['data_nascimento']?></td>
</tr>

 

Você reclamou atoa da "teimosia" dele e de outras pessoas em usar short open tags.

 

Mas antes de ser crítico a esse ponto presta atenção se não é você o teimoso que insiste em não aprender e ficar do lado mais comodo por usar algo que embora seja "antigo" você sabe como funciona.

 

<_<

Compartilhar este post


Link para o post
Compartilhar em outros sites

Botão Direito (Icone WAMP) > PHP > Opções PHP > short open tag (tem que ficar com um tick na frete)

 

Simples assim habilita.

 

Quanto ao comentário do Rodrigo Zanotta, eu sou um que uso a muitos anos short open tag.

 

E não é teimosia e nem preguiça é simplicidade, já fiz site e diversos servidores e nunca precisei que ninguém habilita-se isso para mim, e muitos servers permitem que você crie seu proprio php.ini no diretório do site para alterar as configurações do php.

 

 

Enquanto você quer imprimir uma variável sem short open tag você faz isso.

<strong><?php echo $variavel; ?></strong>

 

Eu só faço isso

<strong><?=$variavel?></strong>

 

Não precisa nem de ";" no final. (Evita erros bobos ao imprimir variaveis)

 

Um ternário é a mesma coisa.

<strong><? echo empty($variavel) ? 'inativo' : 'ativo' ; ?></strong>

<strong><?=empty($variavel) ? 'inativo' : 'ativo'?></strong>

 

 

Isso em um código html muito extenso da muita diferença na compreensão e agilidade do código.

 

Antes


<tr>
   <td><a href="<?php echo $URL->site; ?>painel/contatos/perfil/<?php echo $contato['keycode_contato']; ?>" target="_blank"><strong><?php echo $contato['nome']; ?></strong></a><br />
   <?php echo ($contato['email'] != '') ? "<strong>E-mail:</strong> {$contato['email']}" : "" ; ?>
   </td>
   <td class="orderBy"><?php echo $contato['lideranca']; ?></td>
   <td><?php echo $contato['nivel']; ?></td>
   <td><?php echo $contato['data_cadastro']; ?></td>
   <td><?php echo $contato['data_nascimento']; ?></td>
</tr>

 

Depois


<tr>
   <td><a href="<?=$URL->site?>painel/contatos/perfil/<?=$contato['keycode_contato']?>" target="_blank"><strong><?=$contato['nome']?></strong></a><br />
   <?=($contato['email'] != '') ? "<strong>E-mail:</strong> {$contato['email']}" : "" ?>
   </td>
   <td class="orderBy"><?=$contato['lideranca']?></td>
   <td><?=$contato['nivel']?></td>
   <td><?=$contato['data_cadastro']?></td>
   <td><?=$contato['data_nascimento']?></td>
</tr>

 

Você reclamou atoa da "teimosia" dele e de outras pessoas em usar short open tags.

 

Mas antes de ser crítico a esse ponto presta atenção se não é você o teimoso que insiste em não aprender e ficar do lado mais comodo por usar algo que embora seja "antigo" você sabe como funciona.

 

<_<

 

Muito obrigado. agora ta rodando certinho.

Tudo Ok.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.