Stylesheet file location does not work when i includes it to another php file

  Kiến thức lập trình

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>
<title>This is title</title>

<link rel="stylesheet" href="<?php echo __DIR__?>./stylesheet/new/style.css" />


<!--Here some code-->


my new file in root/new/all.php directory:



//some code


New contributor

hasanofficial27 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website