0
I bought a PHP course and in it the teacher made a generic function to include the files in index.php. But when I add a php call above the <!DOCTYPE html>
, Add all the code and also does not make the file include call. If anyone can help please thank!
index php.
<?php
require ('./dts/dbaSis.php');
require ('./dts/getSis.php');
require ('./dts/setSis.php');
require ('./dts/outSis.php');
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<title>Home</title>
</head>
<body>
</body>
<?php include('./js/jscSis.php'); ?>
</html>
jscSis.php
<script type="text/javascript" src="<?php setHome(); ?>/js/jquery.js"></script>
<script type="text/javascript" src="<?php setHome(); ?>/lightbox/dist/js/lightbox.js"></script>
<link rel="stylesheet" href="<?php setHome();?>/lightbox/dist/css/lightbox.css"/>
<script type="text/javascript">
$(document).ready(function(){
$('#banners').bxSlider({
auto: true,
autoHover: true,
autoControls: false,
controls: false
});
});
</script>
<script>
lightbox.option({
'resizeDuration': 200,
'wrapAround': true
});
</script>
How is your folder structure? If index.php is at the root of your project folder and the folder dts is in the same location, remove the point before the bar.
– Diego
add this at the top of the file
ini_set('error_reporting', E_ALL);
and see what returns– Guilherme SpinXO
It is in the same directory yes. I used netbeans to make the cumin of the aquives by auto complete. I have already done several tests with the path, but it remains the same. I added ini_set() but nothing has changed. If you have any more say I thank you already
– carlos
@Carlos Netbens doesn’t always use the right paths. Try to remove that point before the path at all links and see what gives.
– Jorge B.
I’ve done it, all the ways and nothing. When I put this code here: <? php require ('./dts/dbaSis.php'); require ('./dts/getSis.php'); require ('./dts/setSis.php'); require ('./dts/outSis.php'); ? > html does not appear. I’ll do some more tests and come back here later.
– carlos