google.com, pub-4617457846989927, DIRECT, f08c47fec0942fa0 Learn to enjoy every minute of your life.Only I can change my life.

Tuesday, July 22, 2014

PHP

PHP

  1. PHP is a recursive acronym for "Hypertext Preprocessor".
  2. PHP is a widely-used, open source scripting language.
  3. PHP scripts are executed on the server.
  4. PHP costs nothing, it is free to download and use.
  5. PHP files can contain text, HTML, CSS, JavaScript, and PHP code.
  6. PHP code are executed on the server, and the result is returned to the browser as plain HTML.
  7. PHP files have extension ".php".
  8. PHP can generate dynamic page content.
  9. PHP can create, open, read, write, delete, and close files on the server.
  10. PHP can collect form data.
  11. PHP can send and receive cookies.
  12. PHP can add, delete, modify data in your database.
  13. PHP can restrict users to access some pages on your website.
  14. PHP can encrypt data.
  15. PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.).
  16. PHP is compatible with almost all servers used today (Apache, IIS, etc.).
  17. PHP supports a wide range of databases.
  18. PHP is easy to learn and runs efficiently on the server side.
  19. With PHP you are not limited to output HTML. You can output images, PDF files, and even Flash movies.
  20. You can also output any text, such as XHTML and XML.
  21. In PHP, all user-defined functions, classes, and keywords (e.g. if, else, while, echo, etc.) are NOT case-sensitive.However; in PHP, all variables are case-sensitive.
  22. PHP is a Loosely Typed Language.PHP automatically converts the variable to the correct data type, depending on its value.In other languages such as C, C++, and Java, the programmer must declare the name and type of the variable before using it.


PHP Variables:-

As with algebra, PHP variables can be used to hold values (x=5) or expressions (z=x+y).

A variable can have a short name (like x and y) or a more descriptive name (age, carname, total_volume).

Rules for PHP variables:
  1. A variable starts with the $ sign, followed by the name of the variable
  2. A variable name must start with a letter or the underscore character
  3. A variable name cannot start with a number
  4. A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
  5. Variable names are case sensitive ($y and $Y are two different variables)



PHP Variables Scope:-

In PHP, variables can be declared anywhere in the script.

The scope of a variable is the part of the script where the variable can be referenced/used.

PHP has three different variable scopes:
  1. local
  2. global
  3. static

PHP Data Types:-
PHP Integers:

An integer is a number without decimals.

Rules for integers:

  1. An integer must have at least one digit (0-9)
  2. An integer cannot contain comma or blanks
  3. An integer must not have a decimal point
  4. An integer can be either positive or negative
  5. Integers can be specified in three formats: decimal (10-based), hexadecimal (16-based - prefixed with 0x) or octal (8-based - prefixed with 0)

Example
<?php
$x = 5985;
var_dump($x);
echo "<br>";
$x = -345; // negative number
var_dump($x);
echo "<br>";
$x = 0x8C; // hexadecimal number
var_dump($x);
echo "<br>";
$x = 047; // octal number
var_dump($x);
?>

Basic PHP Syntax:-
A PHP script can be placed anywhere in the document.
A PHP script starts with <?php and ends with ?>

Example:

<!DOCTYPE html>
<html>
<body>

<h1>My first PHP page</h1>

<?php
echo "Hello World!";
?>

</body>
</html>

PHP statements are terminated by semicolon (;).
The closing tag of a block of PHP code also automatically implies a semicolon.
So you do not have to have a semicolon terminating the last line of a PHP block.

Mac OS

The Mac OS is designed to run on Machintosh computers .
It is a very powerful and easy-to-use operating system .It is the world most advanced operating system and the newest version of OS X is free with strongest security.
The latest version of the Machintosh operating system is OS X. This operating system provides a number of unique features:

  • Aqua  is an intuitive user interface.
  • Dock provides a flexible tool for organizing files.
  • Sherlock locates information on the Web as well as on the user's computer system.

                                                      Figure :- OS X

OS X:-
OS X is the line of graphical operating systems developed, marketed, and sold by Apple Inc.
which succeeded the original Mac OS, which had been Apple's primary operating system since 1984.

Unlike the earlier Macintosh operating system, OS X is a Unix-based operating system built on
technology developed at NeXT from the second half of the 1980s until early 1997,
when Apple purchased the company.

Latest version of OS X is OS X Yosemite  (version 10.10) is the upcoming eleventh major release of OS X, Apple Inc.'s desktop and server operating system for Macintosh computers. OS X Yosemite was announced and released to developers and beta testers on June 2, 2014, at WWDC 2014. Yosemite will be released to consumers in late 2014.Following the new naming scheme introduced with OS X Mavericks, Yosemite is named after the national park in California.
System requirements:-No changes in system requirements have been made for Yosemite, meaning that all Macintosh products capable of running OS X Mavericks will be supported by Yosemite; as with Mavericks, 2 GB of RAM, 8 GB of available storage, and OS X 10.6.8 (Snow Leopard) or later are required.









अच्छे विचार करे विचार

  पहचान की नुमाईश, जरा कम करें... जहाँ भी "मैं" लिखा है, उसे "हम" करें... हमारी "इच्छाओं" से ज़्यादा "सुन...