I create a simple book.php
file in my root directory with some stylesheet what I linked with link
tag. But when I try to include the book.php
file into all.php
file from root/new directory the stylesheet does not work. It may not find the path properly. I tried with __DIR__
but could not find any solution.
my root/book.php file:
<!DOCTYPE html>
<html>
<head>
<title>This is title</title>
<link rel="stylesheet" href="<?php echo __DIR__?>./stylesheet/new/style.css" />
</head>
<body>
<!--Here some code-->
</body>
</html>
my new file in root/new/all.php directory:
<?php
require_ones(__DIR__."/../book.php");
//some code
?>
New contributor