If instead of $ a you write a password in the string 'admsh1216hs' and compare, it will work, but after reading from the file, it doesn’t want to compare, is it a bug? The file is being read, there are read permissions.

$hello = 'admsahra1216hs'; $a = file_get_contents('content/pss.txt'); echo $a; if (password_verify($hello, $a)) { echo "True<br>"; } else { echo "err"; } 
  • Encoding and BOM? - Qwertiy
  • No, I'm on linux, here I have to save gedit without a default BOM - hovdev
  • I think just in the file there is a hyphen to a new line. +1 character. admsh1216hs vs admsh1216hs\n - E_p
  • no, checked it first duty) - hovdev
  • Ie $b === $hello //true ? - E_p

1 answer 1

Resolved, Created text documents via Netbeans IDE pss.txt and worked, apparently the problem was still in the BOM.

 PS Видимо gedit тот что на UBUNTU не далеко ушел от notepad.exe на Windows