0

I am working on localhost xammp as I installed xamp and wordpress successfully. Now when I run the php code and provide the path in the Chrome browser, an error message appears that you do not have the permission to access...

Forbidden You don't have permission to access this resource.

Apache/2.4.46 (Win64) OpenSSL/1.1.1g PHP/7.2.34 Server at localhost Port 80

react_or_angluar
  • 1,568
  • 2
  • 13
  • 20
Jawad Kiani
  • 17
  • 1
  • 1
  • 8

2 Answers2

1

I faced the same problem and this is what worked for me

  1. open your xammp file location
  2. copy the .html file to the htdocs folder
  3. then type localhost/
sonali
  • 762
  • 10
  • 23
0

You may have to point to your project in the apache httpd folder. Here is an example where I created a project for a Udemy course: DocumentRoot "C:/xampp/htdocs/Complete HTML and CSS Learn Web Development with HTML and CSS/public" <Directory "C:/xampp/htdocs/Complete HTML and CSS Learn Web Development with HTML and CSS/public">

It was originally DocumentRoot "C:/xampp/htdocs" <Directory "C:/xampp/htdocs">

Restart your apache server and go to localhost and if you have an index file in the folder it will be rendered. Otherwise put the name of the file in the browser search box like this: localhost/divspan.html as in my case. Make sure you save a copy of the httpd file before modifying it so in case there is confusion you cab go back, a sort of version control mechanism for your httpd file.

Dave
  • 1
  • 1