I know there have been similar questions before but I've tried everything suggested in those threads and nothing is working for me. I tried setting the path, changing the location of the files, making sure permisions are right for the files in windows and nothing. I am trying run a php file that includes code to open another php file so I can acquire a connection but everything I do throws the same errors:
Warning: include(C:\xampp\htdocs\website\db_connection\dbconnection.php): failed to open stream: No such file or directory in C:\xampp\htdocs\website\db_connection\index.php on line 11
Warning: include(): Failed opening 'C:\xampp\htdocs\website\db_connection\dbconnection.php' for inclusion (include_path='C:\xampp\htdocs\website\db_connection') in C:\xampp\htdocs\website\db_connection\index.php on line 11
<?php set_include_path('C:\\xampp\htdocs\website\db_connection'); ?>
<?php
include('C:\\xampp\htdocs\website\db_connection\\dbconnection.php');
?>
</head>
<body>
<?php
if(isset($_POST['save'])){
$sql = "INSERT INTO website (id, filelocation)
VALUES ('".$_POST["id"]."','".$_POST["filelocation"]."')";
$result = mysqli_query($conn,$sql);
}
?>
location of files C:\xampp\htdocs\website\db_connection (both files are in this folder)
Maybe someone can see where I'm going wrong any help is appreciated