Friday, April 22, 2011

External CSS

External CSS is called via the <link /> tag within the <head></head>.
The style sheet contains CSS syntax including if needed comment tags "/* */". The external style sheet has a document specification ".css" in our example we are calling in "default.css"
Example:
HTML CODE:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="EN" dir="ltr">
<head>
<title>External CSS Styles</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="default.css" type="text/css" />
</head>
<body>
</body>
</html>

CSS Syntax:
body{color:#FFFFFF; background-color:#000000;}
/* This is a comment */
p{font-family:Verdana, Arial, Helvetica, sans-serif;}
h1{font-size:16px;}


Website Design | Website Design Company | Web Development
Get a beautiful website design. Studio Web is a results oriented web design & online marketing firm serving companies worldwide.
Sponsored Link

Monday, April 18, 2011

PHP source code is compiled


PHP source code is compiled on-the-fly to an internal format that can be executed by the PHP engine.[72][73] In order to speed up execution time and not have to compile the PHP source code every time the webpage is accessed, PHP scripts can also be deployed in executable format using a PHP compiler.
Code optimizers aim to enhance the performance of the compiled code by reducing its size, merging redundant instructs and making other changes that can reduce the execution time. With PHP, there are often opportunities for code optimization.[74] An example of a code optimizer is the eAccelerator PHP extension.[75]
Another approach for reducing compilation overhead for PHP servers is using an opcode cache. Opcode caches work by caching the compiled form of a PHP script (opcodes) in shared memory to avoid the overhead of parsing and compiling the code every time the script runs. An opcode cache, APC, will be built into an upcoming release of PHP.[76]
Opcode caching and code optimization can be combined for best efficiency, as the modifications do not depend on each other (they happen in distinct stages of the compilation).