Solved

when do you need an htdocs

Posted on 2014-01-22
5
209 Views
Last Modified: 2014-01-22
I am new to php and a lot of tutorials and books reference the htdocs directory but I am able to create sites with in the /var/www/html directory without the need for an htdocs directory.

When do I really need an htdocs dir? Is it required on a site?

Thanks.
0
Comment
Question by:centem
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 110

Accepted Solution

by:
Ray Paseur earned 84 total points
ID: 39799980
Not required at all.  Are you putting your PHP scripts on a live server on the internet or running them locally on a laptop?
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 39800017
Also, if you're new to PHP, this article can help steer you to some good learning resources and away from the outdated and terrible examples that litter the internet!
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html
0
 

Author Comment

by:centem
ID: 39800068
I am running them locally with wamp server. Does that make a difference?
0
 
LVL 58

Assisted Solution

by:Gary
Gary earned 83 total points
ID: 39800105
That is just the default directory that WAMP and others use.
You can set it to whatever you like - just look for documentroot in httpd.conf and change the virtual host folder.
http://tuxninja18.wordpress.com/2012/05/24/how-to-change-default-wamp-document-root-directory/
On Windows you wouldn't have /var/www/html - that is a Linux directory format.
0
 
LVL 35

Assisted Solution

by:gr8gonzo
gr8gonzo earned 83 total points
ID: 39800129
htdocs is just a common name for the folder that contains your web content. There's nothing special about the actual name. The thing that actually matters is what your web server is set up to use. Your web server's configuration is what dictates what folder it is going to use.
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MySQL limit and not so limited 13 59
Delete image(s) associated with record(s) 16 45
how to use jquery variable in mysql query 20 71
phpmyadmin memory error 55 89
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question