1
I am trying to connect my Access database with PHP, but it is not finding the way. I didn’t want to put the path related to HD because I host my page on a host (it uses Linux) and so I wanted to put the path related to the page itself.
My code went like this:
// Add arquivo e a extensão
$database_name = $_SERVER["DOCUMENT_ROOT"] . "_assets\db.accdb";
// Verifica se o arquivo existe.
if (!file_exists($database_name )) {
die("Não foi possível encontrar o arquivo.");
}
Which path it has to do to the server folder?
– Adelino Vasconcelos
I don’t know, because the page is hosted on a free host. In the example I took it referred to c:/.. /.. /.. /.. /db.accdb
– Webster Moitinho
it is important to know the directory where you will stay to get the doc
– Adelino Vasconcelos
is hosted... will stay in html folder
– Webster Moitinho
only with this code a person can not know everything, for seeing this seems well but can also be bad
– Adelino Vasconcelos