this post was submitted on 31 Jul 2023
6 points (100.0% liked)
PHP
369 readers
1 users here now
<?
namespace lemmy\php;
/*
Welcome to the PHP community on Lemmy
#Rules:
1: Soon(TM)
#Helpful stuff:
#Common frameworks:
*/
echo "Welcome";
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Well, I learned PHP back around 2002, and still use it today for a lot of smaller projects.
If you have a windows machine, I suggest getting W.A.M.P, windows apache mysql php. If you are doing linux, get L.A.M.P.
Free simple install, gets it all going.
Once installed, launch the web server and you are live.
Your local host folder will be in wamp/www I believe, but there will be a default index.htm in there. If you don't have any port reatrictions, you can access from any device on the network, phone, another laptop, etc.
For an editor, I like dev-php, or php-dev, can't remember and I'm a touch dyslexic. Either way, it's free, and does nice html/ php/javascript etc highlighting.
I'm oldschool, and write basically everything from scratch.
When it comes to frameworks and such, I can't be of help.
One big addition to php that may be new to you are sessions. Cookie based variables that are stored server side so you don't have to pass all info in the get string all the time.
You add session start to the beginning of your code, and any variables stored in $_SESSION['name'] are permanent for as long as the cookie is good. Great for login, page management, anything you don't want to keep passing as a get or post string, but is too trivial to put into a database.
Other than that, there are a ton of great online resources, just google what ever you are trying to do and include php.
I know people like to shit on php, and there are other great languages and tools out there, but its what I learned, and is still my go to for most web based things.
Good luck to you