Anushka Agarwal
Anushka Agarwal

Reputation: 127

Accessing php files inside our own created folder in htdocs

I am new to PHP. I am creating a website using macromedia dreamweaver. I am saving my php files in C:/Xampp/htdocs/myFolder. myFolder is folder created by me inside htdocs. I want to access php files inside myFolder but i am getting an error 404. If I copied my PHP files inside htdocs then i am able to access it. Can I access PHP files that are saved in myFolder?

Upvotes: 0

Views: 16839

Answers (4)

Enter Matrix
Enter Matrix

Reputation: 1

Hi just found a solution, try not using capital letters on the folder's name. Good Luck!

Upvotes: 0

RileyManda
RileyManda

Reputation: 2651

It all depends on how many folders you have inside your subfolder.Xampp by default will allow you to create your own folder within htdocs.but you can only create a maximum of two folders inside that subfolder by default.Create a new subfolder,then make sure that subfolder thats inside htdocs,only has a maximum of 2 folders with your php files and all.It worked for me.My Xampp was failing to find or even display the 3rd folder inside my subfolder.

i.e localhost/newfolder/projectfolder/index.php

Upvotes: 0

Kiel Labuca
Kiel Labuca

Reputation: 1243

First of all, your website will not be visible to your browser if you just put it in your C:/Xampp/htdocs/myFolder without turning on the XAMPP services. You must start the Apache services and MySQL services via XAMPP's conrol panel in order for your localhost to work properly.

Second thing is you must have a .php file named index.php inside your myFolder folder. index.php is the first file that the browser will crawl upon visiting your website. However, you can still browse your file by providing the exact file name in the url of the website you are trying to view. For example, instead of index.php you have in there something like example.php, you can then type the url to your browser as localhost/myFolder/example.php and in that case, the content of the example.php will be the one that the browser will read and display its content.

Upvotes: 1

witherwind
witherwind

Reputation: 472

Try this:

localhost/myFolder/blabla.php

Upvotes: 0

Related Questions