I just started to have experience of making web sites. I know html and flash and things like that. I had some experience with javascript.

What is the use of php? also, what is the use of css and javascript?

which one should i learn first?

which is the most useful?

i would like the answers and this would be a good thread to have.

Dani AI

Generated

Quick, practical clarification and a step-by-step checklist that follows the helpful replies from , and .

"htdocs" is the Apache document root — it does not exist when you use IIS. On a default IIS install the web root is typically:

  • C:\inetpub\wwwroot
    If you later switch to a bundled Apache package, common document roots are:
  • XAMPP: C:\xampp\htdocs
  • WampServer: C:\wamp\www or C:\wamp64\www
    Older stand-alone Apache installs sometimes use C:\Program Files\Apache Group\Apache2\htdocs.

Simple test to confirm PHP is actually being executed by the server (do this before blaming your code):

<?php
phpinfo();
?>

Save that as test.php in the server document root and open http://localhost/test.php in your browser.

  • If you see the PHP configuration page, PHP is working. Delete this file afterwards (it reveals sensitive info).
  • If you see the raw PHP source or the file downloads, you’re either opening it via file:// (double-clicking the file) or IIS has not been configured to hand .php to the PHP engine.

Troubleshooting checklist if phpinfo() fails:

  • Confirm you are browsing via http://localhost/... not file://.
  • In IIS check Handler Mappings / FastCGI/CGI settings: .php must map to the PHP executable (php-cgi.exe) or FastCGI host.
  • Restart IIS after changing mappings.
  • Look at PHP error log and Windows Event Viewer for messages.
  • For permissions, ensure the IIS user can read the webroot and execute PHP binaries.
  • While debugging, you can enable display_errors = On in php.ini — but turn it off on public sites.

If configuring IIS feels hard, use XAMPP/WAMP for local learning. After PHP runs, focus next on form handling, input validation, and using prepared statements for database access.

Recommended Answers

All 6 Replies

I'm going to run through each of the languages, and give you some sample code for each.

PHP: PHP is used to program websites that can do things automatically. Take my website, . When you access it, it accesses a database, gets my posts and the content of the sidebar, then displays it to you.

<?php
//this will display "Hello World" in the browser window
echo "Hello World";
?>

CSS: CSS is used to design pages. You might say "yes, but I can do that in HTML", and you'd be right, but the point of CSS is that if you want to change the design of your website by editing the style sheet you can do it all in one place.

<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: small;
	color: #000000;
}
body {
	background-color: #FFFFFF;
}
-->
</style>

JavaScript: JavaScript is used to do some quite advanced things, such as displaying popups, asking for user input, doing things based on that input, etc. I really don't like this language though (my personal opinion) because if you use a browser that's not called Internet Explorer some of the more advanced stuff will look awful or just plain won't work.

<script language="text/javascript">
location.href="www.blah.com";
</script>

(code above moves to )


Hope that helps,

man if u want to be web developer
u should be familar with doing static web sites, using html, javascript and flash
in the next stage u can use server side programming like (Php, Asp.net..)

Well, i think I know enough of html and flash and all those static site making skills.

i searched everything online for a good php tutorial but nothing is good. I don't even know if I installed the PHP correctly. I don't know how to open a class i made. can anyone help me?

Do we assume you tried to install PHP on a Windows computer? Which web server? IIS? Apache?

It is difficult to help you without some details like this. If you want accurate, thorough answers, ask accurate, thorough questions. :)

IF you want to get PHP working with Apache on Windows, click the WAMP HOWTO link in my signature below. It will walk you STEP by STEP through installation to configuration to creating a test PHP page to see that everything is working.

I installed IIS, though i did it without using a service disk so i don't know if itz rite. i did install the microsoft service pack though.

i installed the PHP too, but they say i need to find the htdoc, where is that?

srry if i'm an idiot

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.