Tuesday, 29 November 2011
Check If PHP is Enabled On Your Server with This Script
1. Create a new blank file in your favorite text editor
2. Place the code below into the new file and save it as "php_check.php"
3. Put it on your server, and view it with your browser, the output will tell you things
php_check.php
Start Copy+Paste for this box here on this line of text
Monday, 28 November 2011
Introduction and Installation of PHP
Introduction and Installation of PHP
What is PHP?
PHP is an acronym for Hypertext Preprocessor. It is a dynamic server side scripting language that allows an application developer to create very simple to very complex mechanisms for the web. Think of PHP as the brain and central nervous system behind your applications. PHP code can be directly mingled in with your HTML page content as long as the page has a .php extension ( myPage.php ). Or it can be scripts and class files placed on server and connected to your front-end files. Any HTML file you have can be turned into a PHP file and PHP script will run inside it.
Why Learn PHP?
- Relatively easy to learn and understand
- Processes data fast and dynamically
- Most dynamic web applications being made today have a PHP core (brain)
- Free Open Source Technology
- Sports over 700 Built-In functions that are ready to automate your programming tasks
- Works very well with MySQL Databases (PHP+MySQL are married)
- Intuitive Syntax is similar to JavaScript and ActionScript
- Create and populate XML files using PHP
- Communicates with Flash (back and forth)
- Time and date functions
- Mathematics to cover any need
- Can be used to create complete social networks, and online forums
- Parse file uploads
- Processes online forms and sends emails
- Imaging Libraries
- Resize Images on the fly, create shapes and colors on the fly out of nowhere
- Create files and directory folders out of thin air
- Create multidimensional data arrays, data looping, and deep data parsing
- Huge Free online resource databases for classes and functions
- The list goes on and on and on.......
Who Is Using PHP In the Programming of Their Website or Applications?
• Facebook
• Google
• Wordpress
• Joomla
• Develop PHP
• PHPBB
• Zen Cart
• OScommerce
• Web Intersect
And Hundreds of Thousands More
Usually any time you can interact with a website in any way, PHP is doing its thing behind the scenes there.
PHP blends well into other useful programming languages
PHP's syntax is very similar to ActionScript(used in Flash and Flex) and JavaScript. So when someone learns any one of these three languages they have a good head start when it comes time to learn the other two. The logic behind PHP is very easy to understand and master once you create a few applications. PHP can also work in tandem with these other languages. You can send information back and forth when needed, to process information in any way you want.
PHP Processing Requirements (installation)
You have two options to enable yourself to work with PHP.
1. Build and test on your web server (easy)
Most people starting in PHP development already have a web server online. Simply create your .php files, FTP them into your web directory and the server will parse them for you automatically. Most web hosts offer PHP support, and if your host does not, consider switching to a better one.
If you do not have a web server online yet, buy a Domain Name for about $10 and set up a free or paid hosting account for that domain name. Be sure to choose PHP and not ASP if given a choice. Then you can FTP files to the server and test online.
2. Create a local testing environment (complicated for beginners)
To install a web server on your PC you should research and install these 3 things.
PHP Core
Apache Server
MySQL Databasing
XAMPP will set up PHP, Apache, and MySQL in one application. Check it out:
Research and get XAMPP for free