Jump to content


Photo

Template Ou Echo


  • Faça o login para participar
2 replies to this topic

#1 zafar

zafar

    Novato no fórum

  • Usuários
  • 12 posts
  • Sexo:Masculino
  • Localidade:Araguaina

Posted 09/12/2010, 17:58

Olá, preciso imprimir um texto na tela e esse texto tem uma variável chamada $url. Não sei se e melhor utilizar um echo que dá muito trabalho pois tenho que fazer linha por linha e ainda tomando cuidado com os caracteres especiais ou então usar um template. Alguém pode me ajudar a achar uma solução menos difícil?

O texto é esse abaixo.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR...nsitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="refresh" content="1; URL=$url">
<title></title>
<style type="text/css">
html {
background: #000;
}
body {
background: #404040;
border: 1px solid #666;
color: #999;
font: 14px "Lucida Grande", "Lucida Sans Unicode", tahoma, verdana, arial, sans-serif;
margin: 5% 10%;
text-align: center;
}

a {
color: #FF8301;
}

h1 {
color: #EEE;
}

#container {
background: #292929;
line-height: 2.4;
padding: 1em;
}

p#url {
font-weight: bold;
overflow: hidden;
width: 100%;
}

</style>
</head>

<body>
<h1></h1>
<div id="container">


<p>Please wait while you're being redirected to ...<br />
In einer Sekunde geht es zu ...<br />
Espera mientras te redireccionamos a ...</p>
<p id="url"><a href="$url">$url</a></p>
<hr />
<p><a href=""></a></p>
</div>

</body>
</html>

Edição feita por: zafar, 09/12/2010, 17:59.


#2 Dough

Dough

    Novato no fórum

  • Usuários
  • 21 posts
  • Sexo:Masculino
  • Localidade:Rio de Janeiro

Posted 10/12/2010, 15:10

tenta isso mas lembre-se que a variável $url tem que estar definida então criei uma coisa:

<?
$url = "http://www.qualquer-site.com";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="refresh" content="1; URL=<? echo $url; ?>">
<title></title>
<style type="text/css">
html {
background: #000;
}
body {
background: #404040;
border: 1px solid #666;
color: #999;
font: 14px "Lucida Grande", "Lucida Sans Unicode", tahoma, verdana, arial, sans-serif;
margin: 5% 10%;
text-align: center;
}

a {
color: #FF8301;
}

h1 {
color: #EEE;
}

#container {
background: #292929;
line-height: 2.4;
padding: 1em;
}

p#url {
font-weight: bold;
overflow: hidden;
width: 100%;
}

</style>
</head>

<body>
<h1></h1>
<div id="container">


<p>Please wait while you're being redirected to ...<br />
In einer Sekunde geht es zu ...<br />
Espera mientras te redireccionamos a ...</p>
<p id="url"><a href="<? echo $url; ?>"><? echo $url; ?></a></p>
<hr />
<p><a href=""></a></p>	
</div>

</body>
</html>

Posted Image Meu post lhe ajudou? Retribuir é uma das formas de agradecer. Não mata ninguém! Só clicar no botão...

#3 zafar

zafar

    Novato no fórum

  • Usuários
  • 12 posts
  • Sexo:Masculino
  • Localidade:Araguaina

Posted 11/12/2010, 12:20

obrigado, mas acabei usando o echo mesmo.

Ficou até bom, quem quiser usar é só colocar a url na frente.

http://ond.me/?http:...mplate-ou-echo/




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq