Latest Posts
Friday, April 22, 2016
Examples of applications of Perl / PHP
Author:
Santosh Kumar Thakur
|
7:57 AM
|
No comments
|
Examples of applications of Perl / PHP
Nor PHP or Perl the best for all web tasks:• Horses for courses
Perl : heavy CGI calculations , for example,
• Search engines ,
• data processing ,
• heavy Access File etc.
• heavy database Access / Usage
PHP: better suited for dynamic HTML , such
• process simple form
• creating a complex site integration
E.g. connected to a database - easy database connectivity.
Including PHP in a web
There are four ways, including PHP during a web page
<?php echo("Hello world!"); ?>
<script language = "php">
echo("Hello world");
</script>
<? echo("Hello world"); ?>
<% echo("Hello world"); %>
You can also use print instead of echo
• method1 is clear and unambiguous- My preferred method
• method 2 is useful in environments containing mixed scripting
languages in the same HTML file.
• method 3 and 4 depending on the server configuration
What happens when the page loads?
When the script runs:
• The code is executed and
• The tag is replaced by the output ( '' hello world '') in
examples above.
• Extra is exactly where the PHP compared to HTML.
- If you view the source of PHP and HTML pages that you do not see PHP.
• can more than a PHP tag in a single web page.
A simple PHP script Preview
Here is the first full PHP script is embedded in HTML:
• we create a level one header with the PHP output text.
• This file is called hello.php:
<html>
<head>
<title>Hello world!</title>
</head>
<body>
<h1><?php echo("Hello world"); ?></h1>
<h1><?php print("This prints the same thing!"); ?></h1>
</body>
<html>
Basic PHP
Comments
PHP supports three types of reactions:
1. Shell style comments - indicated #This is a comment
2. C ++ style comments - called this is A COMMENT
3. C -style comments - marked / * ALL THIS commented! * /
variables
Variables start with the $ symbol (such as Perl) .
E.g.:
$myInteger = 3;
$myString = "Hello world";
$myFloat = 3.145;
PHP data types
data types are not explicitly defined :
• The variable type is determined by the command.
• several Perl.
• The string can be Clear with single and double quotes.
- Rules for String like as in Perl.
• PHP has a boolean type :
Defined as false
- an integer or a value of 0 or float
- The keyword false
- The empty string '' or string ' ' 0 ''
- an empty array or object
- The NULL value
Defined as real
- All non-zero integer or float value
- The key to true
• standard operators with the standard syntax used variables
Thursday, April 21, 2016
Three main applications of PHP
Author:
Santosh Kumar Thakur
|
10:53 AM
|
No comments
|
Disadvantages of Perl / PHP• Management of simple scripts is harder than PHP:- Scripts should be loaded individually from the hypertext markup language pages.- typically scripts also be stored in a special folder - eg cgi-lib.pl,scripts, so do not need to load a separate location.• PHP integrates well into HTML files - • If the PHP code complex can lead to a complex• highly suitable for simple dynamic web processing,mixture of code on the page. Disadvantages of Perl / PHP (Cont.) PHP: • Not so great for more complex tasks* Not as general purpose as Perl.- harder to parse / understand and maintain much code mixed with web page (see above). * PHP requires that the server is configured to parse PHP files.they should not be used in files which do not have to be processed.* Perl similar but both now globaly supported. * also, PHP files must decompose by the server at any load, so * Perl similar but both slightly less overhead. Examples of applications of Perl / PHP• heavy database Access / UsageNor PHP or Perl the best for all web tasks: * Horses for courses Perl: heavy CGI calculations, for example, • Search engines, • data processing, • heavy Access File etc. PHP: better suited for dynamic html, such • process simple formE.g. a database-connected simple database connectivity.• creating a complex site integration
Author:
Santosh Kumar Thakur
|
5:29 AM
|
No comments
|
Introduction of PHP
Author:
Santosh Kumar Thakur
|
4:28 AM
|
1 comment
|
What can PHP do?
As we have just aforementioned PHP is a fully featured programming language
so it will do just about everything.
However, it is best suited and is mainly focused on server-side
scripting so {you can|you'll|you'll be able to} do anything any other CGI program can do
such as:
• Collect form data,
• Generate dynamic page content,
• Send & receive cookies.
• But PHP can do ample extra than we have not got time to deal with
here
– Please refer to recommended course book.
– websites: http://www.php.org,
http://www.php-scripts.com, http://php.resourceindex.com,
and others.
PHP support and installation.
PHP will be used on all major OS :
• Linux
• many UNIX operating system variants ( including power unit - UX , Solaris, and OpenBSD )
Microsoft Windows ,
• Mac OS X
• Windows
• RISC OS ,
• and probably others.
PHP already installed on the varsity network

Tuesday, April 19, 2016
What is the Google Adsense?
Author:
Santosh Kumar Thakur
|
3:06 AM
|
1 comment
|
![]() |
Gmail |
Sunday, April 17, 2016
What is a HTML?
Author:
Santosh Kumar Thakur
|
7:16 AM
|
No comments
|
What is a HTML?
HTML Tags
HTML markup tags are typically called HTML tags.
HTML tags are keywords (tag names) surrounded by angle bracket like <html>.
HTML tags normally come in pair like <p> and </p>
The first tag in a pair is the start tag. The second tags are the end tag.
The end tag is written like the begin tag with a slash before the tag name
Start and finish tags also are known as gap tags and shutting tags
HTML elements
In HTML, most elements are written with a start tag e.g <p> and the end tag e.g </p> with the content in between:
<p>. this is a paragraph </p> Web Browser.
The purpose of a web browser (Google Chrome, internet explorer, Firefox, and Safari) is to read.HTML documents and display them as sites.