Search code examples
phpmyadmin

Finding document_root through commands in PHPMyAdmin?


How can I see my document_root host via PHPMyAdmin? Is there a sql command for this? [PHP/MySQL] I didn't find anything in phpmyadmin variables. I tried several commands but it didn't solve my problem. Is there a solution to this issue?


Solution

  • you can't access through commands in phpMyAdmin but you can find the document_root directory of your web server by the following methods:

    1. Create a PHP script and write this <?php echo $_SERVER['DOCUMENT_ROOT']; ?> and run it on your server.
    2. If you have access to the command line on your server, you can use commands like httpd -V for Apache or nginx -V for Nginx to get information about the server configuration, including the DocumentRoot.