Ho risolto. Grazie a tutti. Era come diceva Thedarkita.... un cavolo di stupido errore \r nella compilazione del fwrite.... che scemo... che scemo.... che SCEMO!!!!!!!!!!!!!! Scusate tutti per il tempo perso e ancora grazie!!!!!
usaikarts
@usaikarts
Post creati da usaikarts
-
RE: Mancato riconoscimento di variabili identiche
-
RE: Mancato riconoscimento di variabili identiche
Mi chiedi scusa?????? Ma che scherzi sono io che ti ringrazio ancora per l'interessamento... sono stato un pò brusco forse nel postare queste info senza un mio testo, ma andavo di fretta....!!! Davvero!!!!!!
Comunque avevo già testato anche questo tipo di variante!! (Purtroppo non ne esco fuori!!!!!!!!!!!!)
-
RE: Mancato riconoscimento di variabili identiche
A list of possible modes for fopen() using mode
'r' Open for reading only; place the file pointer at the beginning of the file.
'r+' Open for reading and writing; place the file pointer at the beginning of the file.
'w' Open for writing only; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it.
'w+' Open for reading and writing; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it. 'a' Open for writing only; place the file pointer at the end of the file. If the file does not exist, attempt to create it.
'a+' Open for reading and writing; place the file pointer at the end of the file. If the file does not exist, attempt to create it.
'x' Create and open for writing only; place the file pointer at the beginning of the file. If the file already exists, the fopen() call will fail by returning FALSE and generating an error of level E_WARNING. If the file does not exist, attempt to create it. This is equivalent to specifying O_EXCL|O_CREAT flags for the underlying open(2) system call.
'x+' Create and open for reading and writing; place the file pointer at the beginning of the file. If the file already exists, the fopen() call will fail by returning FALSE and generating an error of level E_WARNING. If the file does not exist, attempt to create it. This is equivalent to specifying O_EXCL|O_CREAT flags for the underlying open(2) system call.
-
RE: Mancato riconoscimento di variabili identiche
Grazie per l'interessamento. Il file lo scrivo in questo modo:
[php]
$var=@fopen("artisti"."/".$vardirectory."/"."pass.txt","x+");//apro il file .txt (modalità lettura/scrittura)
@fwrite($var,$password."\r");//scrivo la variabile del form nel file .txt
@fclose($var);//chiudo il file .txt[/php]Ancora non ne sono venuto fuori... comunque il file ovviamente me lo scrive... e da verifica con comando echo sembra tutto ok... però poi non passa... sigh sigh sigh!!!!! -
RE: Mancato riconoscimento di variabili identiche
Il mio problema non è tanto nel recupero del dato inviato da form. Ma il controllo di cosa è registrato sul file txt ($contenutopass) rispetto a ciò che viene ripreso da $_Post. Comunque da quanto ho capito non è proprio così scontanta come cosa...
-
RE: Mancato riconoscimento di variabili identiche
Come no, certamente ho controllato.
-
Mancato riconoscimento di variabili identiche
Ciaooo a tutti!!!
Cerco di spiegarmi al meglio ma ho timore di non riuscire...
Da un semplice form registro su txt una ipotetica password. Tutto ok.
In un altro form richiedo l'inserimento della password per accedere ad una pagina. Lo script è il seguente.[PHP]
// INIZIO CODICE APERTURA E LETTURA FILE CON PASS Provaaaaaaaaaaaaaa
$filepassword = "pass.txt";
$handle = fopen($filepassword, "r");
$contenutopass = fread($handle, filesize($filepassword));
echo "$contenutopass";
fclose($handle);
// FINE CODICE APERTURA E LETTURA FILE CON PASS
// INIZIO CODICE VERIFICA PASSWORD
$password=$_POST['password'];//recupero la variabile globale var1 di tipo POST
$password = str_replace(" ", "", $password);
$password = trim($password);
$password = stripslashes($password);
if ($password=="$contenutopass"){ // PUNTO DI VERIFICA
echo ""; // PASSWORD RICONOSCIUTA CORRETTAMENTE
} else {
echo "Password Errata $password";
include("finale_panart_error.php"); // CARICAMENTO PARTE FINALE DELLA PAGINA
exit();
}
// FINE CODICE VERIFICA PASSWORD
[/PHP]La cosa assurda è che da verifica stampate a video con "echo" la variabile $contenutopass, che contiene i dati del file pass.txt, risulta corrispondere a $password, che è appunto quella inserita nel secondo form per cui richiedo la verifica.
Mi potreste aiutare???? sto veramente impazzendo!!!!!!
x
:():