NOTE: This is a collection of information and links collected over the years that might provide useful information. A Safer Company LLC does not guarantee, endorse or approve any of these links or their scripts. Use these links to other websites at your own risk.
php
These are the files in this section:
PHP
PHP stands for "Hypertext Preprocessor". PHP is a powerful and free server-side scripting language and is used to create dynamic and interactive websites. Much of its syntax is borrowed from C, Java and Perl but it also has some unique features.
PHP code is enclosed with special PHP tags: <?php ?> and can be imbedded in a HTML page. When the page is opened, the server processes the PHP code and sends the results of the PHP code to the visitor's browser. The visitor cannot see the PHP code so the PHP scripts cannot be stolen or at least it is harder to copy them.
PHP connects to many databases including MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, and Generic ODBC. UNIX servers or web hosting usuallyl offers PHP-MySQL combination and both are open-source, free products.
PHP contains functions to connect to remote servers, check email via POP3 or IMAP, url encoding, set cookies, redirecting, etc.
Learning PHP
PHP code looks like this:
<html>
<head>
<title>Example</title>
</head>
<body>
<h1><?php echo "PHP Example"; ?></h1>
<?php
/***************************
* This is an example of a PHP script.
******************************/
$name = "Jeanie"; //This line assigns a value to a variable.
echo "<p>My name is $name.</p>";
?>
</body>
</html>
Tutorials
- W3School - PHP Tutorial
- Installing Apache, MySQL, PHP on Windows
- php.net - Excellent Reference
- PHP Manual
- Predefined variables
- String Functions
- Regular Expression Examples
- Arrays
- PHP Sending E-mails
Syntax
mail(to,subject,message,headers,parameters)
- date variables
- Important Full Date and Time:
- r: Displays the full date, time and timezone offset. It is equivalent to manually entering date("D, d M Y H:i:s O")
- a: am or pm depending on the time
- A: AM or PM depending on the time
- g: Hour without leading zeroes. Values are 1 through 12.
- G: Hour in 24-hour format without leading zeroes. Values are 0 through 23.
- h: Hour with leading zeroes. Values 01 through 12.
- H: Hour in 24-hour format with leading zeroes. Values 00 through 23.
- i: Minute with leading zeroes. Values 00 through 59.
- s: Seconds with leading zeroes. Values 00 through 59.
- d: Day of the month with leading zeroes. Values are 01 through 31.
- j: Day of the month without leading zeroes. Values 1 through 31
- D: Day of the week abbreviations. Sun through Sat
- l: Day of the week. Values Sunday through Saturday
- w: Day of the week without leading zeroes. Values 0 through 6.
- z: Day of the year without leading zeroes. Values 0 through 365.
- m: Month number with leading zeroes. Values 01 through 12
- n: Month number without leading zeroes. Values 1 through 12
- M: Abbreviation for the month. Values Jan through Dec
- F: Normal month representation. Values January through December.
- t: The number of days in the month. Values 28 through 31.
- L: 1 if it's a leap year and 0 if it isn't.
- Y: A four digit year format
- y: A two digit year format. Values 00 through 99.
- U: The number of seconds since the Unix Epoch (January 1, 1970)
- O: This represents the Timezone offset, which is the difference from Greenwich Meridian Time (GMT). 100 = 1 hour, -600 = -6 hours
- Date Formats
- Files
- Array Functions
- Important Full Date and Time:
- HTMLite PHP Tutorial
- PHP Builder
- About PHP
- Web Cheat Sheet - PHP Hypertext Preprocessor (PHP) Tutorial Looks like it has some great information.
- PHP Code Snippet Library
- Koders - mailinglists.php
- The Site Wizard
- Javascript Kit - External JavaScript and PHP
- Practical PHP Programming Online Book
- Computer-Books.us - Free Books to Download
Links
- Perl to PHP
- PHP.Net - Downloads, documentation, reference, news, and more on PHP.
- Hotscripts
- About - Using the Mail Function
- LinuxGuruz Includes some tutorials on PHP, as well as other development topics.
- PHP Builder - Contains numerous articles and tutorials on using PHP to perform various tasks and functions. Also includes a support forum and links to other resources.
- PHP Tutorial from Tizag.com - Includes a nice tutorial on the basics of PHP.
- PHP Tutorial from Troubleshooting Professional Magazine - Includes a nice tutorial on PHP to which covers numerous topics that are helpful when coding in PHP.
- Developer Tutorials
- phpWizard.Net - Includes PHP tips, tutorials, projects, resources, links, and more.
- NuSphere (a popular PHP IDE)
- NuCoder 2.0 (a PHP Encoding Utility)
Page last updated: May 31, 2012 10:45 AM
Content and Navigation...