How to deploy my PHP website?
This is a very NOOb questions, I know, but this is m开发者_高级运维y first website that I made, and I have no idea how to deploy it. I made it using PHP, and my file structure is as follows:
Includes
Public
->images
->...
->...
->userview
All my files that will be accessed by the users are in the userview document, and my entry page which is login.php, is also there. How should I deploy it?
I tried just copying the files over to my hoast using filezilla, but it gives a glorious 404 and 403 error depending what i am trying to access.
The output for $_SERVER['DOCUMENT_ROOT']
is /var/chroot/home/content/40/7141640/html
Just copying is right, but you should create a file called index.php (within root folder of your webhosting folder) which is mostly called first. But calling login.php directly should work either.
Wrong path: try sth. like this as path:
$_SERVER['DOCUMENT_ROOT'] . "/public/userview/menulogged.php"
Every webhoster is different, so it´s difficult to find the correct path for me, just ask your webhoster if this doesn´t work or try another directory.
精彩评论