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
one time home cleaning Highland Park ..If you are developing your website on a host that... Read More
Dynamically Update Your Web Pages Via E-MailIf you can Send... Read More
First, using a lot of web graphics, flash, banners and... Read More
When you consider the billions of individuals and companies on... Read More
Does My Web Site Require A Web Database?If your web... Read More
It amazes me how many people try to build serious... Read More
I still remember it very clear ... It was almost... Read More
Optimal website design is the art of logical navigation.It will... Read More
If you are living in a country that its native... Read More
If you don't have a web site yet, are thinking... Read More
There's been widespread speculation about the new legislation being introduced... Read More
If you're an up and coming graphic/web designer just out... Read More
So you've decided to start an online work at home... Read More
"If you build it, they will come"; is an age... Read More
--------------------------------Why Should You Create a website?--------------------------------A. What do you want... Read More
Every business needs to know how it is doing. That's... Read More
This article was prompted by some customer support work I... Read More
This is a growing concern amongst many business owners. Does... Read More
There are many different traffic analysis tools, ranging from simple... Read More
Losing website sales and traffic is sometimes simply a case... Read More
There are hundreds of millions of Web surfers today. Each... Read More
QUESTION: Should I build and maintain my business Web... Read More
You don't believe in astrology but you check your horoscope... Read More
If you've been developing websites on Mars for the past... Read More
In the late 1990's three San Francisco based web developers... Read More
licensed cleaning services Park Ridge ..Knowledge is power.And undoubtedly, it is the key to making... Read More
With search engines putting a damper on direct reciprocal links,... Read More
Optimize your time. How much time each day must you... Read More
A website is lifeline of internet home business. In order... Read More
What is web accessibility & why is it important?Web accessibility... Read More
So you finally decided to invest in a web presence... Read More
Appealing to others is really important when you have a... Read More
There are several reverse bid freelance sites out there. Beyond... Read More
Although designing a great web site is an important part... Read More
When you consider the billions of individuals and companies on... Read More
Go to any internet marketing forum you want these days... Read More
Simply ensuring your website is accessible to screen reader users... Read More
Most people know they need a website in order to... Read More
The popular search engine Google indexes over 8 billion websites.... Read More
This article was prompted by some customer support work I... Read More
You've decided to create a website to market your products... Read More
For years now I've been looking to start my own... Read More
With all of the factors involved in designing and building... Read More
Designing an E-commerce Web site is not as simple as... Read More
It may seem like the publishing industry's equivalent of Beanie... Read More
I recently helped my mom to launch a website (www.mom2me.com)... Read More
80% of your Web site is Maintenance!Once your Web site... Read More
There have been many significant changes to the face of... Read More
Server Side Includes (SSI) with ASP People often... Read More
One of my most salient memories from when I sold... Read More
Web Development |