Learn php?

Posted By: razsports ()
Posted On: 2005-Jul-21 09:25



I currently have the knowledge in CSS, HTML and search engine optimization. That being said, I'd like to learn PHP. I've read a few books on php, visited several forums and have looked over examples. However, I don't understand the meaning of coding such as that listed below(scroll down). My question is there a place online where I can find the meaning of
$fp = fopen( $att, "r"wink; $file = fread( $fp, $att_size );
and other coding?

Thanks


Posted By: g1smd (Staff)
Posted On: 2005-Jul-21 17:36


http://www.php.net


Posted By: lizardz ()
Posted On: 2005-Jul-21 17:50

The best way to learn is to take a programming class from a local adult school, college, etc. All programming uses more or less the same logic, if you can find a php class, good, but if you can't, try java or something like that, a beginner c++ class will give you a great foundation, but it's a lot harder than php.

Programming is a sort of discipline, and it's much easier to learn if someone teaches you how to not make the mistakes almost everybody who starts from scratch will invariably do.

The other way, which works well as long as you have some foundation to work from, say having taken some programming classes, is to download scripts and see how they work. The main problem with that method if you're starting from scratch is you have no idea what is a good example of programming, and what is a horrible example.

phpBB has fairly good programming practices, not the best, but pretty good, better than most stuff you can find out there, but it's pretty complicated to understand for a beginner. There are tons of free scripts out there you can play with, pick apart etc.

Keep in mind, when programming the errors you can make are far more serious than with html or css, you can severely compromise your site's security with some very simple, and easy to make, errors. Read up on php security, there's lots of material on the web.

Third most important is to setup apache on your local box, with mysql and php, trying to do development work without it is a real pain.

Fourth is learning a huge amount of patience, part of programming is debugging, it's a big part, a major percent of your programming time is spent debugging.

When you can make a page on your local development box with this code:
<?php
echo 'hello world';
?>
and have it correctly output hello world you are well on your way, since it means you have gotten apache/mysql/php running.