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
green cleaning service Winnetka ...Everywhere you look these days, people are telling you that... Read More
Failure, just like success, is measured differently by each and... Read More
Web templates by nature are created to aid and ease... Read More
A website provides invaluable advantages for businesses who have one.7... Read More
While it may seem like a "quick and easy" task,... Read More
An automated accessibility tool is a piece of software which... Read More
"What's in it for me?" you ask. "Why should I... Read More
Your site is getting traffic, but conversion rates are horrible.... Read More
Can you imagine the hypocrisy of spending thousands of dollars,... Read More
When I started my company in 2002, I knew I... Read More
Having an eye catching website is great, but are you... Read More
It's now easier than ever to take payments on the... Read More
There was a time not long ago when setting up... Read More
Your web site will be your window to the world.... Read More
Creating and maintaining an effective presence on the Web has... Read More
Psychology is a long word which everyone thinks, "no, that's... Read More
After having decided to start a business, the next thing... Read More
Looks like every client wants a Flash site these days... Read More
People like to get immediate responses to requests. Autoresponders are... Read More
The Disability Discrimination Act states that service providers must not... Read More
Q. Hey, Cathy: I'm just setting up a website. What... Read More
Customer service questionnaires can help your clients better understand their... Read More
1) Word of Mouth The single most powerful form of... Read More
I am just a learner who likes to delve in... Read More
If you are living in a country that its native... Read More
reliable home cleaners Deerfield ...Are bloated images slowing down your web site and causing... Read More
We've all seen those messages on some websites warning not... Read More
They might not be wearing a mask and carrying a... Read More
An interesting eCommerce success factor that isn't precisely overlooked, but... Read More
1. Address your targeted audience on your business site. Example:... Read More
If you're looking for better web site ROI, chances are,... Read More
There was a time not long ago when setting up... Read More
As increasing numbers of people search for information on the... Read More
When used to describe a web site, the term "sticky"... Read More
1) Data CaptureOne easy way to collect e-mail addresses and... Read More
Cost Effective Advertising. Online selling. Increased geopgraphic range. Wider... Read More
We all start out the same. Some have budgets, some... Read More
While it may seem like a "quick and easy" task,... Read More
If you don't have a web site yet, are thinking... Read More
Analyzing traffic to a site is a key factor in... Read More
For years now I've been looking to start my own... Read More
The Disability Discrimination Act states that service providers must not... Read More
Like any area of business your website needs some effort... Read More
If you're an up and coming graphic/web designer just out... Read More
"If you build it, they will come"; is an age... Read More
That's right. According to a recent study by Nielsen/NetRatings, Amazon.com... Read More
If you have your own business website and you are... Read More
What is SQL? SQL stands for Structured Query Language and... Read More
When I started my company in 2002, I knew I... Read More
Making maximum profit from your law firm website is important,... Read More
Web Development |