So, i am working on an eCommerce style of website and i own a host/domain. From my understanding, i should place my PHP files in another location than public_html(for security purposes), the location of index.html being in /home/user/public_html. I want to put my PHP files in the php folder. I have tried using:
include("home/user/php/file.php")
or
include("../php/file.php")
.
I have enabled the use of these commands in the ini file and i also tried to set permissions to the folders(read/write/execute).One thing that was working is to set a subdomain with its "root" folder to the php folder, but i guess that defeats the purpose of having the files somewhere else on the server, especially because i was using an object to place my php like so:
<object class="php-script" data="database.php"></object>
and under my java scripts i put :
<?php
include("/home/user/php/database.php");
?>
Thanks in advance for helping me.