I started a php project in netbeans and connected it with a database in localhost/phpmyadmin
. But on running it gives this error on browser..
Why does this happen? How to avoid it?
Here are the codes in the project.. dbconnect.php and index.php. Files are saved in /var/www/html/Testing/
(Testing is name of project).
Edit : I tried URL localhost/Testing/index.php
but still gets the same error.
Edit2 : Folder structure of /var/www
Use path like
localhost/Testing/index.php
. Remove html folder from URL.Reason ? Linux by default considers PHP files in html folder. So no need to give that folder name in url.