在php中以纯文本进行散列后存储密码是否安全

I have to make a login system with PHP, but don't have any database to store, as it will be an admin login only for max 5-6 people, so what i was thinking was Concating the username and password and hashing with sha512 and storing in text file. Want to ask is it a good option considering security?

Don't include the username in the hash, to allow for changes of either password or username, otherwise that's perfectly fine. Saving a hashed password is industry standard. Look at how e.g. Drupal does it here.

It doesn't matter where you store your passwords if they properly hashed. Think about this way: if someone will get access to your server in most cases they will get access to DB as well, so storing something in DB doesn't make it automatically more secure.

Also if you have only a few people who access data, you can restrict by IP or special cookie if you want.