Rami
Rami

Reputation: 8314

Where to put files needed by web pages

I have some PHP and HTML pages that need to access some files (images files for example) and display them.

Where should I put these files? As I know that it is not recommended (for security reasons) to let the web pages access files in the file system of the server (like in the home directory for example).

I need to put the files (the images) in a folder where I have the rights to create new files.

Upvotes: 4

Views: 9089

Answers (2)

user756706
user756706

Reputation:

You need to put files in virtual directory of your server, for example if you are using XAMPP then put your files in "htdocs" folder. if you are using WAMP then put your files in "www".

Upvotes: 6

user3370268
user3370268

Reputation: 75

Add a directory inside of your www folder and put your web pages there. Then you can access the pages as localhost/foldername/page

Upvotes: 0

Related Questions