PHP
I currently know nothing about or have ever used the .php language. It is for my benefit that I find out the basic understanding of what .php actually is, and what it can do. I used reference sites, books and blogs to find out some background information on this language. I will learn as much as I can about the language before I actually start to use it, and document it.
.php stands for Hypertext Pre-processor, and was created by Rasmus Lerdorf. Its original name was Personal Home Page script. .php is a server-side scripting language with a similar syntax to C and is used for creating dynamic content on websites. .php is also an open source language, which means the original code can be edited by anyone without copyright or ownership issues. Some sites do charge for using their complete code. It also supports MySQL language and the Apache program. There are hundreds of .php forums so any questions that require answering can be found quickly. For these reasons, it has become one of the most popular open source languages.
It was originally created as a set of macros to help coders manage their site. Its name grew a lot more from its purpose. The language was extended, and new features were added. It is now capable of managing a huge database driven website.
In an HTML page, PHP code is enclosed within special PHP tags. When a visitor opens the page, the server processes the PHP code and then sends the output (not the PHP code itself) to the visitor's browser. It means that, unlike JavaScript, you don't have to worry that someone can steal your PHP script.
.php runs in conjunction with HTML files. The .php code is used within special .php tag. The server processes the .php code and sends an output to the visitor’s browser. If .php is used within a HTML file then the extension must be changed from .html to .php.
.php versions up to date are 5.2.5, which was released on the 8th of November 2007, and 4.4.8. The version 4 has now been discontinued (http://es.php.net/downloads.php#v4), and the last version has been released. The version of .php you will be using needs to be defined on your hosting server.
Benefits
Page loading times increase due to less processor intensive work. The strain on the server is also lower. This is because the code is optimised, which means the server has to do less work. This will also increase loading times.
Free to obtain, as it is an open source language.
The community offers technical support and continuously updates the code further expanding .php’s capabilities.
Data is stored on the server, which means the site can load and save forms and details much faster. Data is also stored for if the viewer returns. .php allows the website to become more dynamic. This means that the site will react to the viewer. Things like the viewers preferences can be saved and then called back for when they return.
No need for plug-in software to make the site work properly, unlike Flash. Everything is run from the server so nothing from the users end is required.
The language is recognised and will work on all of the latest platforms. The syntax is also relatively simple, meaning it’s easy to migrate from one programming language to this one.
Disadvantages
The language can be quite hard to learn to new language programmers, although if you already know several languages and their syntax then it’s pretty easy to pick up on.
Error finding is tricky. One little mistake can mess up the whole site. I think this counts for most programming languages. They need to be correctly typed with notes. The code can make your document untidy, especially if adding multiple languages into the same web page.
What can it do?
Create login forms – Login forms allow access to restricted pages for authorised members only. This feature is useful and is used widely across the web, mainly for pay sites and downloads.
Create eCommerce sites – Sites such as online shops where card transactions take place.
Create feedback forms – Feedback forms allow the viewer to give constructive feedback for the site they are viewing.
Create email forms – The forms created can be sent straight to the clients email address. This will allow them access to all the feedback they have received from the viewers simply by logging into their email account.
Attach to databases – Databases allow the storage of personal viewer details and preferences. This means that returning customers can have their details saved and then taken place next when they log in.
Create Content Management Systems (CMS) – CMS allows the end user easier content changes for their site. It’s good for users that don’t know a lot about programming by hand. Things such as Blogs are done this way.
Insert and manipulate dates and times – Inserting the date and time onto a website is beneficial for the viewer as it will tell the user the time and date. They can compare this with article dates to say whether the article is old or new.
Create hit counters – Hit counters show the amount of people that have visited your site from the start. The counter can be reset easily.
Header and footer inclusions – Create and edit your site headers and footers.
Create rate bars – Rate bars allow the site/content to be voted on. The results are shown in a rate bar which will show how good/bad the item is.
URL Manipulation – Add cloaks to the URL to make it look neater. Good for users with extremely large URL names.
Create text input fields – Text input fields are used on forms to gather information that could potentially be used and saved on a database. The forms can be given specific targets to meet i.e. date must be specified in the dd/mm/yyyy format, please try again.
Create shopping baskets – Shopping baskets allow viewers to buy a list of things, rather than one item.
Website statistics – This allows the end user to view many different stats about their website. It allows them to see how many visitors they receive per day or how many they have had totally, and various other features.
Create forums – Create topics for chats and discussions to take place.
Create rotations for images – Images that change for every visit to the page. I.e. the header will change from A to B for every visit by the same user, or the header for each page on that particular website will be different. Many companies use this when advertising pop-ups.
Create images and graphs – Display graphics and charts easily
Create calendars and address books – Create calendars to plan your week or store birthdays. The Address book allows details to be saved.
Create votes and surveys – These can be used to gather answers quickly. The vote results will be shown in a table. Online surveys are similar to appear based surveys, and the final results will usually be sent to the creator through an email.
Set file permissions – This allows the end user to block certain content that they do not wish viewers to see.
No comments:
Post a Comment