panique / php-login-one-file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

$this->db_sqlite_path = str_replace('\\','/', pathinfo( __FILE__ )['dirname']) . "/users.db";

sl5net opened this issue · comments

https://github.com/panique/php-login-one-file/blob/master/index.php#L24
i reommand to use:

public function __construct($doSilently=false)
{
    $this->db_sqlite_path = str_replace('\\','/', pathinfo( __FILE__  )['dirname']) . "/users.db";

so you could include the demo index.php file.

commented

Hey, sorry what exactly do you mean ? Can you please say what would be the advantage over the current solution, and is this 100% save for all OS ?

Thanks!

i need to do this if i use it out of a different folder.

include_once('resources/php-login-one-file-master/index.php');