Jump to content
Fórum Script Brasil
  • 0

Função Include


Marcos Guiga

Question

Bom galera em minha caminhada pelo PHP encontrei um problema com um include

e o seguinte estou a fazer uma codigo que recupera senha do usuario, porem so da o seguinte erro no codigo:

Warning: include(usuarios/.txt) [function.include]: failed to open stream: No such file or directory in D:\Programas\wamp\www\Usuarios\msg.php on line 57

Warning: include() [function.include]: Failed opening 'usuarios/.txt' for inclusion (include_path='.;C:\php5\pear') in D:\Programas\wamp\www\Usuarios\msg.php on line 57

linha 57:

if($msg=="suasenha"){
include("usuarios/$user.txt");
  echo"Sua senha em nosso sistema é <b>$senha</b><br><br>";
}
Lembrar.php
<?php
$user=$_POST["user"];
$email=$_POST["email"];
$data=$_POST["data"];

if (file_exists("usuarios/$user.txt")){
include("usuarios/$user.txt");
    if($user=="$user" && $data=="$data"){
 echo "<script>location.href='msg.php?msg=suasenha&volt=$user'</script>";
    
    }
    else{
     echo "<script>location.href='msg.php?msg=dados'</script>";
    }
     
}
else{
 echo "<script>location.href='msg.php?msg=user'</script>";
}
?>

Edited by Marcos Guiga
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...