Ir para conteúdo
Fórum Script Brasil
  • 0

Problemas Nos Recorsets


Guest --gustavo--

Pergunta

Guest --gustavo--

Olá pessoal,

desenvolvi um sistema de noticias com os recordsets do Dreamweaver.

Beleza...no meu server funciona legal.....só que quando passo pro BRturbo, as páginas simplismente somem....não aparece nada...nenhum erro....nenhum HTML, nada....

branquinho....

ó um exemplo....

exemplo

a página existe, e dentro dela tem codigos HTML e PHP, tudo funciona normal no meu Server, só quando passo pra internet acontece isso...

alguém sabe o que fazer?

brigadao pessoal..

Link para o comentário
Compartilhar em outros sites

7 respostass a esta questão

Posts Recomendados

  • 0
Guest Visitante

olha todo o codigo gerado....

<?php require_once('../Connections/Noticias.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}


$foto = $_FILES["imagem"]["name"];
$fotoTmp = $_FILES["imagem"]["tmp_name"];


if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO noticias (titulo, subtitulo, texto, imagem, legenda) VALUES (%s, %s, %s, '$foto', %s)",
                       GetSQLValueString($_POST['titulo'], "text"),
                       GetSQLValueString($_POST['subtitulo'], "text"),
                       GetSQLValueString($_POST['texto'], "text"),
                       GetSQLValueString($_POST['legenda'], "text"));



// Função que cria a imagem, não trabalharemos com upload.

function geraImg($img, $max_x, $max_y, $imgNome) {
    //pega o tamanho da imagem ($original_x, $original_y)
    list($width, $height) = getimagesize($img);
    $original_x = $width;
    $original_y = $height;
    // se a largura for maior que altura acho a porcentagem
    if($original_x > $original_y) {
       $porcentagem = (100 * $max_x) / $original_x;      
    }
    else {
       $porcentagem = (100 * $max_y) / $original_y;  
    }
    $tamanho_x = $original_x * ($porcentagem / 100);
    $tamanho_y = $original_y * ($porcentagem / 100);
    $image_p = imagecreatetruecolor($tamanho_x, $tamanho_y);
    $image = imagecreatefromjpeg($img);
    imagecopyresampled($image_p, $image, 0, 0, 0, 0, $tamanho_x, $tamanho_y, $width, $height);
    return imagejpeg($image_p, $imgNome, 100);
}

// Chama a imagem, passando os parâmetros a ela.
geraImg($fotoTmp, 500, 500, "../recordsets/".$foto); 


  mysql_select_db($database_Noticias, $Noticias);
  $Result1 = mysql_query($insertSQL, $Noticias) or die(mysql_error());
}
?>


<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<form action="<?php echo $editFormAction; ?>" method="post" enctype="multipart/form-data" name="form1">
  <table align="center">
    <tr valign="baseline">
      <td nowrap align="right">Titulo:</td>
      <td><input type="text" name="titulo" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right">Subtitulo:</td>
      <td><input type="text" name="subtitulo" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right">Texto:</td>
      <td><input type="text" name="texto" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right">Imagem:</td>
      <td><input name="imagem" type="file" size="32"></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right">Legenda:</td>
      <td><input type="text" name="legenda" value="" size="32"></td>
    </tr>
    <tr valign="baseline">
      <td nowrap align="right"> </td>
      <td><input type="submit" value="Insert record"></td>
    </tr>
  </table>
  <input type="hidden" name="MM_insert" value="form1">
</form>
<p> </p>
</body>
</html>

o resto funciona....normalmente....somente esses gerados com recordsets....

mas já utilizei um monte de vezes em outros servidores e funcionou normalmente...

abraço

Link para o comentário
Compartilhar em outros sites

  • 0

Pode ser que no BrTurbo não esteja instalada a GD e aí estas linhas (por exemplo)

$image_p = imagecreatetruecolor($tamanho_x, $tamanho_y);

$image = imagecreatefromjpeg($img);

não funcionam, mas no php do servidor lá deve estar configurado para não mostrar os erros... aí não aparece nada.

Tem como colocar em outro servidor para testar?

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152k
    • Posts
      651,8k
×
×
  • Criar Novo...