Answers for "php document root path"

PHP
1

php document root

<?php echo $_SERVER['DOCUMENT_ROOT'].'/hello.html'; ?>
Posted by: Guest on October-02-2020
9

define root path php

<body>
<?php 
    define('ROOT_PATH', dirname(__DIR__).'/');
    include ROOT_PATH.'header.php';
    include ROOT_PATH.'main.php';
    include ROOT_PATH.'footer.php';
?>
</body>
Posted by: Guest on September-05-2021

Browse Popular Code Answers by Language