Go Back   TechArena Community > ARENA > Education Career and Job Discussions
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Thread Tools Search this Thread
Old 30-08-2008
Join Date: Aug 2008
Posts: 31
Want to Learn PHP

Hello friends

I want to learn PHP. Can someone provide me Information about PHP and Institute name from where i can learn.
Reply With Quote
Old 30-08-2008
Join Date: Aug 2008
Posts: 30
PHP is a computer scripting language. Originally designed for producing dynamic web pages, it has evolved to include a command line interface capability and can be used in standalone graphical applications. While PHP was originally created by Rasmus Lerdorf in 1995, the main implementation of PHP is now produced by The PHP Group and serves as the de facto standard for PHP as there is no formal specification.

PHP is a powerful server-side scripting language for creating dynamic and interactive websites.

PHP is the widely-used, free, and efficient alternative to competitors such as Microsoft's ASP. PHP is perfectly suited for Web development and can be embedded directly into the HTML code.

The PHP syntax is very similar to Perl and C. PHP is often used together with Apache (web server) on various operating systems. It also supports ISAPI and can be used with Microsoft's IIS on Windows.
Reply With Quote
Old 30-08-2008
Join Date: Aug 2008
Posts: 68
Information on PHP

  • PHP stands for PHP: Hypertext Preprocessor
  • PHP is a server-side scripting language, like ASP
  • PHP scripts are executed on the server
  • PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
  • PHP is an open source software (OSS)
  • PHP is free to download and use

PHP Files
  • PHP files may contain text, HTML tags and scripts
  • PHP files are returned to the browser as plain HTML
  • PHP files have a file extension of ".php", ".php3", or ".phtml"

Advantages of PHP
  • PHP runs on different platforms (Windows, Linux, Unix, etc.)
  • PHP is compatible with almost all servers used today (Apache, IIS, etc.)
  • PHP is FREE to download from the official PHP resource: www.php.net
  • PHP is easy to learn and runs efficiently on the server side
Reply With Quote
Old 05-09-2008
Join Date: Jul 2008
Posts: 99
How do I write to a file using PHP

There is a basic pattern to writing to a file, it goes something like this:
  • Open the file using fopen
  • Lock the file using flock
  • Write to the file using fputs or fwrite
  • Unlock the file using flock
  • Close the file using fclose

This is the order that the operations (usually) need to be carried out in. The following example shows you how to create a file, then write a string to the file.


Handle - The name often given to the variable defined when using the fopen function.
Mode - A letter that represents how the file should be opened when using fopen.


$fp = fopen('filename.txt', 'w'); // set the handle to the variable $fp
// and open the file in "w" mode.

$string = 'Test String'; // set the $string variable

flock($fp, LOCK_EX); // lock the file "exclusivley" for writing

fputs($fp, $string); // write the data to the file

flock($fp, LOCK_UN); // unlock the file

fclose($fp); // always call fclose to close the file.
// forgetting to close or lock files is the main cause of
// files getting corrupted.

  1. Now, to go over the example, the first line, where the fopen function is used, opens the file in writeable mode... If the file does not exist it will attempt to create it. The important thing to remember about using the "w" mode in fopen is that any data in the file will be truncated (emptied). There are other file handling modes, which can be looked up on the php website: <http://www.php.net/fopen>. Some of these other modes will also be covered later in this post.
  2. On the next line, we just simply set the variable $string to the value 'Test String'. This is the data that will get written into the file later on.
  3. Next we lock the file using flock. Using an exclusive lock, which is set by putting LOCK_EX, the file is locked from other scripts writing to the file or reading from it while we put the new information into the file. If the file isn't locked and two scripts try to write to it at the same time, it can get corrupted.
  4. The next part is the part that actually writes the information to the file. Using the fputs function it use the file path and data supplied ($fp and $string in this case), and writes $string to $fp.
  5. From here, the file needs to be unlocked using flock again, otherwise no other scripts would be able to write or read it. To unlock the file, we use LOCK_UN.
  6. Finally, we have finished with the file so we can close it. Using the fclose function we pass it the file handle ($fp) and it closes it. You should always do this as this is another thing that can lead to files getting corrupted.
Reply With Quote
Old 16-09-2008
Join Date: May 2008
Posts: 42
I hope this helps you!
Institute for PHP Development
Reply With Quote
Old 01-10-2008
Join Date: Jun 2008
Posts: 96
Please have a look at this thread
PHP code needed
I hope this helps you!
Reply With Quote
Old 05-10-2008
Posts: n/a
If you have any question, you can get answer at www.phpbuilder.com, which has a popular php developer forum
Reply With Quote
Old 10-10-2008
Posts: n/a
Want to Learn PHP

originally stood for Personal Home Page.[8] It began in 1994 as a set of Common Gateway Interface binaries written in the C programming language by the Danish/Greenlandic programmer Rasmus Lerdorf. Lerdorf initially created these Personal Home Page Tools to replace a small set of Perl scripts he had been using to maintain his personal homepage.
Reply With Quote
Old 10-10-2008
Join Date: Jun 2008
Posts: 96
Thanks a lot for the site tyuivbn!
Reply With Quote

  TechArena Community > ARENA > Education Career and Job Discussions
Tags: ,

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "Want to Learn PHP"
Thread Thread Starter Forum Replies Last Post
Want to learn French kohali Education Career and Job Discussions 3 16-03-2009 01:45 PM
Want to learn ASP.Net Makrand Education Career and Job Discussions 5 29-11-2008 05:05 PM
learn to program bigboy Software Development 1 03-10-2008 05:34 PM

All times are GMT +5.5. The time now is 08:31 PM.