Unconfigured Ad Widget

Collapse

Anúncio

Collapse
No announcement yet.

erro tela branca em script PHP

Collapse
X
 
  • Filter
  • Tempo
  • Show
Clear All
new posts

  • Font Size
    #1

    Duvida erro tela branca em script PHP

    Meu código PHP, não executa simplesmente entra em uma tela branca, por favor poderiam analisar o meu código e ver se acham o(s) erro(s)???
    É que sou iniciante em PHP e não consigo achar a causa
    Esse é meu codigo:
    Código PHP:
     <?php
    $emai
    =$_COOKIE["email"];
    $email=str_replace('%40','@',$emai);
    $titulo=$_POST["titulo"];
    $descricao=$_POST["descri"];
    $completo=$_POST["completo"];
    $img1=$_POST["img1"];
    $img2=$_POST["img2"];
    $img3=$_POST["img3"];
    $img4=$_POST["img4"];
    $img5=$_POST["img5"];
    $completo1=str_replace($img1,"<img src=\"/posts/$titulo/$img1\"",$completo);
    $completo=str_replace($img2,"<img src=\"/posts/$titulo/$img2\"",$completo1);
    $completo1=str_replace($img3,"<img src=\"/posts/$titulo/$img3\"",$completo);
    $completo=str_replace($img4,"<img src=\"/posts/$titulo/$img4\"",$completo1);
    $completo1=str_replace($img5,"<img src=\"/posts/$titulo/$img5\"",$completo);
    $completo=nl2br($completo1);
    $descri=nl2br($descricao);
    $codeindex="<html>
        <head>
            <title>
                
    $titulo
            </title>
            <link rel=\"stylesheet\" type=\"text/css\" href=\"/css/base.css\">
        </head>
        <body bgcolor=\"F6F2A4\">
            <center class=\"retangulo\">
                <br>
                <br>
                <a href=\"/posts\">POSTS</a>
                <a href=\"/forum\">FORUM</a>
                <a href=\"/downloads\">DOWNLOADS</a>
                <a href=\"/conta\">CONTA</a>
                <a href=\"/avisar\">AVISAR</a>
                <a href=\"/login\">LOGIN</a>
                <a href=\"/cadastro\">CADASTRO</a>
                            <a href=\"/upload\">UPLOAD</a>
            <br>
            <br>
            <br>
            <br>
                                        <h1>
                                                  
    $titulo
                                        </h1>
                                        <br>
                                        <br>
            <p>
                    
    $completo1
            <br>
            <br>
            <br>
                                           por:
    $email
            </p>
        </center>
        </body>
    </html>"
    ;
    mkdir("/posts/$titulo",0700);
    $index=fopen("/posts/$titulo/index.txt","x");
    fwrite($index$completo1);
    fclose($index);
    rename("/posts/$titulo/index.txt","/posts/$titulo/index.html");
    $quanti='<html>
        <head>
            <title>
                Posts
            </title>
            <link rel=\"stylesheet\" type=\"text/css\" href=\"/css/base.css\">
        </head>
        <body bgcolor=\"F6F2A4\">
            <center class=\"retangulo\">
                <br>
                <br>
                <a href=\"/posts\">POSTS</a>
                <a href=\"/forum\">FORUM</a>
                <a href=\"/downloads\">DOWNLOADS</a>
                <a href=\"/conta\">CONTA</a>
                <a href=\"/avisar\">AVISAR</a>
                <a href=\"/login\">LOGIN</a>
                <a href=\"/cadastro\">CADASTRO</a>
                            <a href=\"/upload\">UPLOAD</a>
            <br>
            <br>
            <br>
            <br>
            <p>
                           Se quiser adicionar uma imagem no servidor,<br>
                           voce faz o upload da imagem na sessao uploud,<br>
                           e para adicionar na postagem, voce coloca o nome<br>
                           dela e a extenssao onde voce quer que ela apareca<br>
                           na postagem, tambem coloca nos campos de imagem,<br>
                           no maximo 5 imagens na postagem.
                           <br>
                           <form method=\"post\" action=\"postar.php\" enctype=\"multipart/form-data\">
                           <label>
                                       titulo
                           </label>
                           <br>
                           <input type=\"text\" name=\"titulo\" size=\"15\" maxlength=\"35\">
                           <br>
                           <label>
                                       pequena descricao
                           </label>
                           <br>
                           <textarea rows=\"10\" cols=\"40\" maxlength=\"100\" name=\"descri\"></textarea>
                           <br>
                           <label>
                                       conteudo completo
                           </label>
                           <br>
                           <textarea rows=\"15\" cols=\"60\" maxlength=\"15000\" name=\"completo\"></textarea>
                           <br>
                           <label>
                                      imagem 1
                           </label>
                           <br>
                           <input type=\"text\" name=\"img1\" size=\"15\" maxlength=\"35\">
                           <br>
                           <label>
                                      imagem 2
                           </label>
                           <br>
                           <input type=\"text\" name=\"img2\" size=\"15\" maxlength=\"35\">
                           <br>
                           <label>
                                      imagem 3
                           </label>
                           <br>
                           <input type=\"text\" name=\"img3\" size=\"15\" maxlength=\"35\">
                           <br>
                           <label>
                                      imagem 4
                           </label>
                           <br>
                           <input type=\"text\" name=\"img4\" size=\"15\" maxlength=\"35\">
                           <br>
                           <label>
                                      imagem 5
                           </label>
                           <br>
                           <input type=\"text\" name=\"img5\" size=\"15\" maxlength=\"35\">
                           <br>
                           <input type=\"submit\" value=\"postar\">
                           <br>
            <br>
            <br>
            <br>'
    ;
    $link="<a href=\"/posts/$titulo\">$titulo</a>
    <br>
    $descri
    <br>"
    ;
    $quantidade=strlen($quanti);
    $index=fopen("/posts/index.html","x");
    fseek($fp$quantidade);
    fwrite($index,$descri);
    fclose($index);
    ?>
    Similar Threads

  • Font Size
    #2
    Tela Branca

    Teria que ter o arquivo todinho, para saber por que o erro.

    Comment


    • Font Size
      #3
      Postado Originalmente por nullbit Ver Post
      Meu código PHP, não executa simplesmente entra em uma tela branca, por favor poderiam analisar o meu código e ver se acham o(s) erro(s)???
      É que sou iniciante em PHP e não consigo achar a causa
      Esse é meu codigo:
      Código PHP:
       <?php
      $emai
      =$_COOKIE["email"];
      $email=str_replace('%40','@',$emai);
      $titulo=$_POST["titulo"];
      $descricao=$_POST["descri"];
      $completo=$_POST["completo"];
      $img1=$_POST["img1"];
      $img2=$_POST["img2"];
      $img3=$_POST["img3"];
      $img4=$_POST["img4"];
      $img5=$_POST["img5"];
      $completo1=str_replace($img1,"<img src=\"/posts/$titulo/$img1\"",$completo);
      $completo=str_replace($img2,"<img src=\"/posts/$titulo/$img2\"",$completo1);
      $completo1=str_replace($img3,"<img src=\"/posts/$titulo/$img3\"",$completo);
      $completo=str_replace($img4,"<img src=\"/posts/$titulo/$img4\"",$completo1);
      $completo1=str_replace($img5,"<img src=\"/posts/$titulo/$img5\"",$completo);
      $completo=nl2br($completo1);
      $descri=nl2br($descricao);
      $codeindex="<html>
          <head>
              <title>
                  
      $titulo
              </title>
              <link rel=\"stylesheet\" type=\"text/css\" href=\"/css/base.css\">
          </head>
          <body bgcolor=\"F6F2A4\">
              <center class=\"retangulo\">
                  <br>
                  <br>
                  <a href=\"/posts\">POSTS</a>
                  <a href=\"/forum\">FORUM</a>
                  <a href=\"/downloads\">DOWNLOADS</a>
                  <a href=\"/conta\">CONTA</a>
                  <a href=\"/avisar\">AVISAR</a>
                  <a href=\"/login\">LOGIN</a>
                  <a href=\"/cadastro\">CADASTRO</a>
                              <a href=\"/upload\">UPLOAD</a>
              <br>
              <br>
              <br>
              <br>
                                          <h1>
                                                    
      $titulo
                                          </h1>
                                          <br>
                                          <br>
              <p>
                      
      $completo1
              <br>
              <br>
              <br>
                                             por:
      $email
              </p>
          </center>
          </body>
      </html>"
      ;
      mkdir("/posts/$titulo",0700);
      $index=fopen("/posts/$titulo/index.txt","x");
      fwrite($index$completo1);
      fclose($index);
      rename("/posts/$titulo/index.txt","/posts/$titulo/index.html");
      $quanti='<html>
          <head>
              <title>
                  Posts
              </title>
              <link rel=\"stylesheet\" type=\"text/css\" href=\"/css/base.css\">
          </head>
          <body bgcolor=\"F6F2A4\">
              <center class=\"retangulo\">
                  <br>
                  <br>
                  <a href=\"/posts\">POSTS</a>
                  <a href=\"/forum\">FORUM</a>
                  <a href=\"/downloads\">DOWNLOADS</a>
                  <a href=\"/conta\">CONTA</a>
                  <a href=\"/avisar\">AVISAR</a>
                  <a href=\"/login\">LOGIN</a>
                  <a href=\"/cadastro\">CADASTRO</a>
                              <a href=\"/upload\">UPLOAD</a>
              <br>
              <br>
              <br>
              <br>
              <p>
                             Se quiser adicionar uma imagem no servidor,<br>
                             voce faz o upload da imagem na sessao uploud,<br>
                             e para adicionar na postagem, voce coloca o nome<br>
                             dela e a extenssao onde voce quer que ela apareca<br>
                             na postagem, tambem coloca nos campos de imagem,<br>
                             no maximo 5 imagens na postagem.
                             <br>
                             <form method=\"post\" action=\"postar.php\" enctype=\"multipart/form-data\">
                             <label>
                                         titulo
                             </label>
                             <br>
                             <input type=\"text\" name=\"titulo\" size=\"15\" maxlength=\"35\">
                             <br>
                             <label>
                                         pequena descricao
                             </label>
                             <br>
                             <textarea rows=\"10\" cols=\"40\" maxlength=\"100\" name=\"descri\"></textarea>
                             <br>
                             <label>
                                         conteudo completo
                             </label>
                             <br>
                             <textarea rows=\"15\" cols=\"60\" maxlength=\"15000\" name=\"completo\"></textarea>
                             <br>
                             <label>
                                        imagem 1
                             </label>
                             <br>
                             <input type=\"text\" name=\"img1\" size=\"15\" maxlength=\"35\">
                             <br>
                             <label>
                                        imagem 2
                             </label>
                             <br>
                             <input type=\"text\" name=\"img2\" size=\"15\" maxlength=\"35\">
                             <br>
                             <label>
                                        imagem 3
                             </label>
                             <br>
                             <input type=\"text\" name=\"img3\" size=\"15\" maxlength=\"35\">
                             <br>
                             <label>
                                        imagem 4
                             </label>
                             <br>
                             <input type=\"text\" name=\"img4\" size=\"15\" maxlength=\"35\">
                             <br>
                             <label>
                                        imagem 5
                             </label>
                             <br>
                             <input type=\"text\" name=\"img5\" size=\"15\" maxlength=\"35\">
                             <br>
                             <input type=\"submit\" value=\"postar\">
                             <br>
              <br>
              <br>
              <br>'
      ;
      $link="<a href=\"/posts/$titulo\">$titulo</a>
      <br>
      $descri
      <br>"
      ;
      $quantidade=strlen($quanti);
      $index=fopen("/posts/index.html","x");
      fseek($fp$quantidade);
      fwrite($index,$descri);
      fclose($index);
      ?>
      que bagunça cara, ,manda o script todo para saber o erro

      Comment

      X
      Working...
      X