When you started reading this sentence you assumed lo acabaría en inglés. However, I didn't finish in English. This begs the question, 'In which language did I finish?' Unless I tell you the language, you'd have to run around and compare the words against known words in order to learn that it was Spanish, but I'd bet you'd give up and move on first. Servers work much the same way; if you don't let it know the language it assumes you're speaking to someone else (the browser) and sends it along. Servers aren't even friendly enough to give it a whack and see how it comes out.
So, what's server-speak for "Here comes PHP!"? Well, it definitely looks foreign:
Sure. Whatever. It's no use telling the server you're speaking PHP because you only know how to say "I speak PHP". What's that going to do for you? Well, imagine you were visiting a scripts site and wondering how you could put today's date on your webpage when you come across the following little snippet:
To display the date on your webpage, find the area you want to put the date then insert the code below.
echo date('m/d/Y');
Now, you're equipped with 2 statements: "I'm going to be speaking PHP" and "Today's date is mm/dd/YYYY". You then edit the file you want to put the date in by inserting this code in the desired location: Put the file back on the server and you're date shows up exactly as the snippet said it would. Or does it?
If you got lucky, it showed up. If not, there's a little more to learn. There's actually more than one way to tell the server that PHP is coming and I've only covered one way - the other ways aren't necessary for you to know in order to use PHP on your site. Most servers require a bit more information first - they want the name of the file to say whether PHP is there or not. To tell the server that PHP is inside the file, you need to change the extension (the part after the dot) to php. Uh, sure, the extension. Does this guy speak English? YEP! lol. If that wasn't clear, let's illustrate by assuming your file was called index.html when you downloaded it to edit. Before you upload that file back to the server, you need to change "html" to "php", so that the file is called index.php. Without that change most servers won't even look for PHP. The nice thing is that even if a file ends in "php", the server still looks for those opening pieces saying "Here comes PHP!" before trying to read what follows in PHP and just sends everything back to the browser which is outside of PHP, so you don't hurt anything!
Tired of reading? Me too! And, we can only do a couple of things! Or can we? There are a lot of scripts out there which require you to copy and paste a little code here and there or to include a file. In those cases, you are now leaps and bounds ahead in getting them to work!
Jeremy Miller - Webmaster of Script Reference - The *NEW* PHP Reference & Tutorial Site For Non-Programmers
We've all seen those messages on some websites warning not... Read More
Building a new website can be a lengthy task. From... Read More
Internet Marketing is not a miracle marketing strategy ? competition... Read More
Any new website competing on the internet, needs to take... Read More
Many small companies choose not to invest in a professionally... Read More
How can we add Word Rich Content to our Websites... Read More
The growth in Internet usage around the world is astounding... Read More
What is the point of having a website, you may... Read More
A website provides invaluable advantages for businesses who have one.7... Read More
"How do I improve web site sales figures?" The CEO... Read More
Can you imagine the hypocrisy of spending thousands of dollars,... Read More
"I have a small business with just a couple of... Read More
The Disability Discrimination Act says that websites must be made... Read More
Why do some web sites reap huge benefits while others... Read More
Many millions of dollars are being wasted on promoting and... Read More
D.zigns dzignerwebs The Basics Before starting on... Read More
Your content is what gets you in search engines, speaks... Read More
I'm a freelance programmer and somehow I managed to get... Read More
If you're fairly new to the Internet scene, you may... Read More
"'Page Not Found' on this Server. Check the URL and... Read More
If you like the Internet and surfing through the billions... Read More
Spend time planning your Web site. Before you design a... Read More
There are lots of HTML editors on the market, however,... Read More
So what do you do if need to get a... Read More
Visitors to your site come looking for information or solutions... Read More
Below, I have listed 8 simple steps that you can... Read More
I am just a learner who likes to delve in... Read More
A professional online reputation is essential to the flourishing of... Read More
Keywords in Search Engine Optimizing and Search Engine Marketing are... Read More
People like to get immediate responses to requests. Autoresponders are... Read More
Creating and maintaining an effective presence on the Web has... Read More
Many web developers today are starting to KISS their website,... Read More
More and more businesses are recognizing the importance of content... Read More
What is the most important part of your online business?Many... Read More
The popular search engine Google indexes over 8 billion websites.... Read More
When building a relationship, listening is more important than talking.A... Read More
Fresh website content for your visitors can be of real... Read More
How many Web Sites did you stumble over telling you... Read More
Simply ensuring your website is accessible to screen reader users... Read More
If you have your own business website and you are... Read More
With search engines putting a damper on direct reciprocal links,... Read More
The Disability Discrimination Act states that service providers must not... Read More
In this day and age most businesses consider having their... Read More
Your web site will be your window to the world.... Read More
"I have a small business with just a couple of... Read More
Even with the steady growth of the World Wide Web,... Read More
One of the most useful features offered by some web... Read More
Why do some web sites reap huge benefits while others... Read More
Q. Hey, Cathy: I'm just setting up a website. What... Read More
Setting up a website is the very first step of... Read More
No matter the size of your business, having a web... Read More
Starting an internet business can be confusing to non-veterans. The... Read More
In this example I have used the map of the... Read More
Your business website is a critical aspect of being able... Read More
The needs of screen magnifier users are overlooked when implementing... Read More
Your site is getting traffic, but conversion rates are horrible.... Read More
The first thing you will have to deal building your... Read More
Many executives and investors are skeptical that software products can... Read More
Getting a Targeted Visitor to a website is a waste... Read More
Although CSS layouts have been around for years, they haven't... Read More
How popular is online shopping? And is there room for... Read More
You hear a great deal about the Internet these days... Read More
1) A marketing necessityI still hear it said from time... Read More
A PHP Redirect automatically transfers a web user from one... Read More
Project Safekids provides webmasters a valuable tool which could save... Read More
Your content is what gets you in search engines, speaks... Read More
Web Development |