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
spotless home service Lake Forest ..Everywhere you look these days, people are telling you that... Read More
If one more business owner tells me their website sucks... Read More
Understanding and using web analytics.In recent years, website marketers were... Read More
If you ever want to create a state directory, article... Read More
Designing an E-commerce Web site is not as simple as... Read More
Starting and maintaining a business is challenging enough without the... Read More
A system development process can follow a number of standard... Read More
"'Page Not Found' on this Server. Check the URL and... Read More
Functions and Subroutines in ASP If you read... Read More
There's been widespread speculation about the new legislation being introduced... Read More
Are bloated images slowing down your web site and causing... Read More
The cost of setting up a web site is dirt... Read More
There are lots of HTML editors on the market, however,... Read More
When you consider the billions of individuals and companies on... Read More
The internet has taken over our lives with a vengeance,... Read More
While studying online for IT investment opportunities, I found that... Read More
Designing and creating your own website does not have to... Read More
Do you need a web site? Are you considering getting... Read More
1. Upload robots.txt file in to your root directory and... Read More
There is an ongoing debate about web copy. Some say... Read More
Although there are significant differences among the various types of... Read More
Does My Web Site Require A Web Database?If your web... Read More
If you don't have a web site yet, are thinking... Read More
If you are looking for creating your online presence you... Read More
Having an eye catching website is great, but are you... Read More
weekly home cleaning Mundelein ..Your web site will be your window to the world.... Read More
I can't think of any business alive today that couldn't... Read More
1) Word of Mouth The single most powerful form of... Read More
A website provides invaluable advantages for businesses who have one.7... Read More
Building a new website can be a lengthy task. From... Read More
If you don't have a web site yet, are thinking... Read More
We all start out the same. Some have budgets, some... Read More
Conceptualize, Build and Publish a Web site - What's required... Read More
Yahoo has long offered email, an online calendar, notes, bookmarks,... Read More
An accessible Web site is easily approached, easily understood, and... Read More
If you're looking for better web site ROI, chances are,... Read More
I am just a learner who likes to delve in... Read More
If you have your own business website and you are... Read More
Research reveals three important facts:1) The Internet is one of... Read More
1) A marketing necessityI still hear it said from time... Read More
I had a client say something to me the other... Read More
That's right. Your method, behavior and strategy you are now... Read More
You've decided to create a website to market your products... Read More
Dan Kennedy once said that if you can't make money... Read More
Every small business owner knows that they need a website,... Read More
A lot has changed in the way sites are optimized... Read More
Although there are significant differences among the various types of... Read More
Everyone wants one.Everyone wishes they knew how to make one.SOME... Read More
Looks like every client wants a Flash site these days... Read More
With search engines putting a damper on direct reciprocal links,... Read More
Web Development |