I have a header design template in folder: /template/header.php
. In the header.php file I'm using Bootstrap.
Then I created another file in the folder: /karyawan/karyawan_form.php
In my karyawan_form.php INCLUDE file header.php file
So karyawan_form.php script file like this:
<?php
include_once '../template/header.php';
?>
<div class="container">
Welcome to my website!
</div>
Then it does not run on localhost with the link:
localhost / belajarajax / karyawan / karyawan_form.php
But why the yard look like ordinary PHP view; like no Bootstrap?
It should be:
include_once '../../template/header.php';
I think
use
<?php
include_once dirname(__FILE__).'/template/header.php';
?>
The stylesheets and scripts propably aren't loaded on the including page. Change the links in your header.php
. Try to change the link references in your header.php, for example:
/template/src/bootstrap.min.js
/template/src/bootstrap.min.css