title: separating php and html, stuck in loading images and css
body: <p>I'm new with php. I have a question about separating php and html. This is the root directory of my website</p>
  
  <pre><code>Root
    template 
        html
           image  
           script
           css
           main.html
     main.php
    template.php
  </code></pre>
  
  <p>when I load the main.php by using template.php and main.html, images are not displayed. I know the reason is wrong directory(the current directory is root, not template/html). So how can I fix this problem? How can I import to main.php?</p>