The first tool you will need for learning PHP is a workspace. A place you can write and test your code. That is usually two work spaces, the first being a quality text editor and the second is a way to host your code (and test it) on a server.
Not a Word Processor
A Text Editor is not a Word Processor. We who have made the mistake to every having touched a Windows computer, may remember notepad. Well, that is a Text Editor. On the other hand, Word from the Microsoft Office Suite is NOT a Text Editor. Do not try to write code on Word – it will just give you headaches and sleepless nights.
Those smart people who use and support Ubuntu should not try to use LibreOffice Writer, that like Word (only better) LibreOffice Writer is a Word Processor. The built in Text Editor in Ubuntu is called gedit, which is actually pretty (a lot better than notepad).
I Dream of Geany
If you want my very best, #1, Top Recommendation for a Text Editor, use Geany (I do!). Geany has a lot of plugins and customization you can use for the type of coding you do, and built in php support!
Gedit is a distant second choice. For those stuck using Windows, I still recommend Geany! I works across platforms, so you do not need to relearn things. Second choice would be Notepad Plus Plus. This is second choice because it has no version for Linux / Unix, so you are stuck using Windows. There is no version for Notepad++ for anything except Windows. The logical conclusion is therefore get rid of Windows!
HOSTING Your PHP
The next thing you will need for your education in PHP is some kind of hosting.
You (don’t) pay your money and you take your chances. Free Hosting is really not that great. Remember all those companies are trying to get you to BUY hosting. So they have down time and other problems as well.
The good thing about the PHP Free Hosting sites is they are free!, they can be a good place to TRY some code! But i would not recommend them for a serious site.
LAMP or LAMPP is another option for learning PHP. L.A.M.P.P. stands for: It allows you to develope you own code, right on your own computer. Even if you are not connected to the Internet. L.A.M.P.P. stands for:
- LAMP usually does not do some things like the function mail() (sending mail).
- LAMP does not link you to servers outside of your computer, unless you connect and open that path.
These drawbacks are minor for most code, but you should be aware of them. A lot of people use a LAMP server in their own computer to develop their own code.
For people with PHP hosting already, you can just create a directory and upload your test pages there.
Putting this tag:
<meta name="robots" content="noindex">
In the <head> section of your html test pages will keep your test pages off of Google and most reputable Search Engines.
Testing PHP Works!
Make a Webpage with only this in it…
<?php phpinfo(); ?>
Save the File using something like your name for a file name.
Do NOT use phpinfo.php !!!
marie-info-pelin.php would be good, or
marie-pelin-info-testing.php would also be good.
Go to your browser and address this page… you should see a lot of useful information about how your server is set up.
Unfortunately this information is also useful to a cracker trying to compromise your server! That is why we use a unique file name like your name!
Once you can see the phpinfo you know your php is installed and working properly. Now we can begin…