Ask Question Forum:
C
O
M
P
U
T
E
R
2
8
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Y-position of the mouse cursor
Attachment:===
1- I want to know Concept about server & client-side in web for its language or working responsible

I have my domain name, and i put the following Example-1 code into mypublic_htmlindex.html on my server.
I've some misunderstanding about server and client's job during browering. Please help to answer
the question kindly
Question-1 my domain system is acting as a server ?
Question-2 When I browser www.mydomain.co.cc my IE will download the index.html from my server and run the html with javascript code in IE windows since IE is able to read HTML and Javascript syntax, Right ?
Question-3- THe server with domain name doesn't do anything or excution besides having index.html on its disk because the index.html is for client-side program, Right ?
Question-4 The javescript/HMTL is only client-side language, Right ? nothing relate to the Linux server
Question5- I put the example-2 code into server at public_html test.php. WHen I borrows it in my IE,
the html code in test.php is excuted by IE , how about the php code, whose responsiblity to excute the code
my server or my IE. When veiw the code in IE from tool bar , the php code is not existed except html code only.
Why ? People always said PHP is server-side lauguage.
Example-1
<html>
<head>
<script type="text/javascript">
function mouseOver()
{
document.getElementById("b1").src ="http://www.mydomaim.co.cc/images/gif/b_blue.gif";
}
function mouseOut()
{
document.getElementById("b1").src ="http://www.mydomain.co.cc/images/gif/b_pink.gif";
}
</script>
</head>
<body>
<a href="http://www.w3schools.com" target="_blank">
<img border="0" alt="Visit W3Schools!" src="http://www.hf-trade.co.cc/images/gif/b_blue.gif" id="b1" width="26" height="26" onmouseover="mouseOver()" onmouseout="mouseOut()" /></a>
</body>
</html>
<p>An absolute URL: <a href="http://www.w3schools.com" target="_blank" >W3Schools</a></p>
<p>A relative URL: <a href="tag_a.asp">The a tag</a></p>
</body>
</html>
Example-2
<html>
<body>
<a href="index.php">Home </a>
<a href="page2.php">Page 2</a>
<a href="page3.php">Page 3</a>
<a href="page4.php">Page 4</a>
<?php
echo "Hello World";
$file=fopen("index.html","r");
echo " File may already exists";
?>
</body>
</html>
Question-1 my domain system is acting as a server ?
Some web hosts will host PHP, ASP.NET, JSPs, etc.. It all depends on the host. You will want to check with them to see what you can run on their servers.
Question-2 When I browser www.mydomain.co.cc my IE will download the index.html from my server and run the html with javascript code in IE windows since IE is able to read HTML and Javascript syntax, Right ?
That is exactly right.
Question-3- THe server with domain name doesn't do anything or excution besides having index.html on its disk because the index.html is for client-side program, Right ?
That is correct.
Question-4 The javescript/HMTL is only client-side language, Right ? nothing relate to the Linux server
Correct.
Question5- I put the example-2 code into server at public_html test.php. WHen I borrows it in my IE,
the html code in test.php is excuted by IE , how about the php code, whose responsiblity to excute the code
my server or my IE. When veiw the code in IE from tool bar , the php code is not existed except html code only.
Why ? People always said PHP is server-side lauguage.
PHP is a scripting language that is embedded in your HTML. This allows you to dynamically generate content on HTML page. If your web server is setup correctly the PHP should be run from the server. It will not be executed from the browser.
Question-1 my domain system is acting as a server ?
Some web hosts will host PHP, ASP.NET, JSPs, etc.. It all depends on the host. You will want to check with them to see what you can run on their servers.
Question-2 When I browser www.mydomain.co.cc my IE will download the index.html from my server and run the html with javascript code in IE windows since IE is able to read HTML and Javascript syntax, Right ?
That is exactly right.
Question-3- THe server with domain name doesn't do anything or excution besides having index.html on its disk because the index.html is for client-side program, Right ?
That is correct.
Question-4 The javescript/HMTL is only client-side language, Right ? nothing relate to the Linux server
Correct.
Question5- I put the example-2 code into server at public_html test.php. WHen I borrows it in my IE,
the html code in test.php is excuted by IE , how about the php code, whose responsiblity to excute the code
my server or my IE. When veiw the code in IE from tool bar , the php code is not existed except html code only.
Why ? People always said PHP is server-side lauguage.
PHP is a scripting language that is embedded in your HTML. This allows you to dynamically generate content on HTML page. If your web server is setup correctly the PHP should be run from the server. It will not be executed from the browser.