Aqua-Soft Forums: About PHP - Aqua-Soft Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

About PHP Rate Topic: -----

#1 User is offline   platter007 Icon

  • Group: Member
  • Posts: 1
  • Joined: 23-August 08

Posted 23 August 2008 - 07:44 AM

About PHP

PHP is an acronym of hypertext preprocessor. It is a server side language through which we can make a dynamic web page by embedding PHP code into HTML. To run PHP pages you need to have following installation on your system/machine.

OS (Operating System) -> Windows/Linux
Server -> IIS/Apache
Database -> MySQL, MSSQL, ORACLE, MSACCESS, PostgreSQL etc.
PHP -> PHP Installation on System

You can easily run PHP on Windows by installing WAMP server. WAMP stands for Windows+Apache+MySQL+PHP and popularly used as development platform next to LAMP (Linux+Apache+MySQL+PHP).

A sample PHP page script starts as follows:
=========CODE BEGINS========

echo 'Hello World'; //(echo) Print Output on Screen
?> //PHP Ends

=========CODE ENDS==========

There are various support and tutorials available for PHP. Some popular resources are:
http://www.php.net (PHP site)
http://www.mysql.com (MySQL site)
http://www.w3schools.com/PHP (PHP Tutorials)
0

#2 User is offline   KAWSquared Icon

  • Group: Member
  • Posts: 2,940
  • Joined: 04-December 06

Posted 24 August 2008 - 03:26 AM

Thanks for the info!


Nah, just kidding.
0

#3 User is offline   schmrom Icon

  • Group: Member
  • Posts: 594
  • Joined: 23-July 07

Posted 24 August 2008 - 01:12 PM

This post is confusing me oO
0

#4 User is offline   Phoshi Icon

  • Group: Member
  • Posts: 996
  • Joined: 03-April 08

Posted 24 August 2008 - 05:30 PM

Man, thanks.
You saved me a lot of googling!
0

#5 User is offline   KAWSquared Icon

  • Group: Member
  • Posts: 2,940
  • Joined: 04-December 06

Posted 24 August 2008 - 05:44 PM

In Soviet Russia, Google saves YOU!
0

#6 User is offline   schmrom Icon

  • Group: Member
  • Posts: 594
  • Joined: 23-July 07

Posted 24 August 2008 - 06:40 PM

This topic is really confusing me, what made him think it would help someone? You can find informations about PHP all over the web Oo
0

#7 User is offline   dennisalcayde Icon

  • Group: Member
  • Posts: 87
  • Joined: 13-February 08

Posted 25 September 2008 - 06:08 AM

have you considered python instead of php?
0

#8 User is offline   Goodlookinguy Icon

  • Group: Member
  • Posts: 1
  • Joined: 27-September 08

Posted 27 September 2008 - 06:26 PM

Ha, this is funny.

Quote

echo 'Hello World'; //(echo) Print Output on Screen
?> //PHP Ends


If the person who wrote this really knew php, they would have written the above as what I wrote below

<?php // PHP Begins
echo "Hello World"; //(echo) Print Output on Screen
/* PHP Ends */ ?>


You can't put a // comment after you close the php tag.

My message in php

<?php
if (!isset($_GET['know'])) {
 $message = "Fail";
}
else {
 $message = "Wow, you actually know php?
";
  if (isset($_POST['lie'])) {
   $message .= "No you don't";
  }
  else {
   $message .= "I guess you do.";
  }
}
echo $message; // Let's find out whether or not you really know php
?>


EDIT: I'm bored, so I wrote this real quick
<?php
if (file_exists('inc/configuration.php')) {
 require_once('inc/configuration.php);
 if (isset($_GET['post']) && $_GET['post']!="") {
  $mysql_query = mysql_query("SELECT * FROM mydatabase WHERE post = ".intval($_GET['post']));
  if (!mysql_query) {
   echo "Error Occurred: Query Failed to Retrieve Data";
  }
  else {
   while($rows = mysql_fetch_array($mysql_query) {
	$postTITLE = $rows['title'];
	$postTEXT = $rows['text'];
	$postBY = $rows['by'];
   }
   $message_block = "<div align="center"><div style="width:604px;"><div style="width:300px;float:left;">".mysql_real_escape_string(htmlentities($postTITLE))."</div><div style="width:300px;float:right;">".mysql_real_escape_string(htmlentities($postTEXT))."</div></div><div style="width:604px;">Post By ".htmlentities($postBY)."</div></div>";
  echo $message_block;
  }
 }
 else {
  echo "Welcome to the Site!";
 }
}
else {
 echo "Error Occurred: Configuration File is missing";
}
?>

------------

By the way, hello all. I was searching the internet for something else but noticed that there was a web programming area and decided to join because this post made me laugh.
0

#9 User is offline   bizcoaching Icon

  • Group: Member
  • Posts: 3
  • Joined: 06-January 09

Posted 06 January 2009 - 04:07 PM

I'll just complement on your kindness platter007. But these people are not beginners. :)
0

#10 User is offline   Laser Icon

  • Group: Member
  • Posts: 3
  • Joined: 09-June 09

Posted 09 June 2009 - 05:55 AM

PHP is a server-side scripting language for creating dynamic Web pages. You create pages with PHP and HTML. When a visitor opens the page, the server processes the PHP commands and then sends the results to the visitor's browser, just as with ASP or ColdFusion. Unlike ASP or ColdFusion, however, PHP is Open Source and cross-platform. PHP runs on Windows NT and many Unix versions, and it can be built as an Apache module and as a binary that can run as a CGI. When built as an Apache module, PHP is especially lightweight and speedy. Without any process creation overhead, it can return results quickly, but it doesn't require the tuning of mod_perl to keep your server's memory image small.

In addition to manipulating the content of your pages, PHP can also send HTTP headers. You can set cookies, manage authentication, and redirect users. It offers excellent connectivity to many databases (and ODBC), and integration with various external libraries that let you do everything from generating PDF documents to parsing XML.

PHP goes right into your Web pages, so there's no need for a special development environment or IDE. You start a block of PHP code with <?php and end it with ?>. (You can also configure PHP to use ASP-style <% %> tags or even <script LANGUAGE="php"></SCRIPT>.) The PHP engine processes everything between those tags.

PHP's language syntax is similar to C's and Perl's. You don't have to declare variables before you use them, and it's easy to create arrays and hashes (associative arrays). PHP even has some rudimentary object-oriented features, providing a helpful way to organize and encapsulate your code.

Although PHP runs fastest embedded in Apache, there are instructions on the PHP Web site for seamless setup with Microsoft IIS and Netscape Enterprise Server. If you don't already have a copy of PHP, you can download it at the official Web site. You'll also find a manual that documents all of PHP's functions and features.

This post has been edited by mps69: 10 October 2009 - 04:30 PM

0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic