![]() |
Questions about working with php
I'm resurecting an old site of mine and sadly, it needs a good update and facelift. Now despite my education and best efforts, I remain a horrible coder. Let's just say there are good reasons why I always try to use my dick to make money and not my brain. I know that I'm an idiot and I've given up trying to hide it.
Problem: The original site is in php and it's over 10 years old. Questions: 1. What do I need to download so that I can create a php enviroment on my desktop? 2. I've been working with Dreamweaver so long that I don't know anything else. Is there something better? 3. What other questions should a moron like myself be asking about this subject? ; |
Quote:
2) I use Notepad++, but alot use netbeans, php storm, sublime 3) Read up on xss, sql injection and csrf. |
|
I use WAMP on my desktop
PSPad as my editor And keep a browser open to https://www.php.net/ for reference . |
WAMP + Notepad++ here as well :)
|
You can run Apache and PHP on your desktop although the versions are slightly different to what a server would be running. If the code is really really old there may be some things that are deprecated in newer versions of PHP which might break it but if you run it on PHP 5.6 I don't think you'll find too many. Netbeans is good and free as an IDE, the latest versions need the Java SDK to install.
|
Quote:
I studied computer science in university but I have always been a less than mediocre when it comes to any kind of code. Which unfortunately also includes html, php, etc. |
Quote:
Once you get past all the syntax and deprecated errors you can get down to making the code actually work again. You will learn more about php code by going through the debug than any other method, just my opinion of course. Edited in: My answer assumes that you want to learn php coding, of course. . |
Am I the only one who doesn't like Notepad++
I prefer normal Notepad. |
Quote:
. |
i still use frontpage express...
|
Quote:
Anyone remember having to run list then stop where you want to look at a section of code, or just printing it all out to debug? :upsidedow |
Quote:
|
Quote:
Wouldn't mind but these SQL files are friggin huge. I wouldn't even attempt to open that with normal Notepad though. Think it would shit the bed. |
Quote:
|
Quote:
|
Wamp or Mamp to create local server. If you're connecting to a database you might need to change it from mysql to mysqli, other than that you shouldn't have too much trouble. My editor of choice is sublime but each to their own :)
Hit me up if you need any help. slowdown [at] gmail |
I have no idea on any of that. I do not use Notepad++, I have played with it in the past but I have been using PSPad for at least 10 years so it is my go to.
In PSPad, if you so not close the file before shutting it down, it will attempt to reopen the file when you start back up. But, if you close the file before you shut down, it does not do that. I would imagine that Notepad++ is pretty similar. The auto brackets and parens has never bothered me in any way, shape or form. They are right there on the screen. I can see them so I rarely end up typing them. . |
Quote:
I'm working through this but it's going to take me some time. |
Quote:
wanting to send you a PM :thumbsup |
Quote:
|
Don't be so harsh on yourself.
As for the coding/testing your project locally I find EasyPHP most convenient/easiest, hence the name? (Sadly only for Windows OS) Mentioned above Notepad++ is good for small edits. For coding in php bigger things/from scratch some php IDE. |
Quote:
. |
Quote:
|
Quote:
|
Quote:
says, and I quote.. Quote:
|
Apache NETBEANS!!! Best damn program for coding out there and it's FREE!!!
See sig if you want help. I'm slow at the moment and can help if you need it. ;) |
Quote:
Quote:
FYI: I've been talking to one of the admins and I'm hoping that they'll give me the account that I registered in 2003. If that happens then I'll once again need to post 30Xs in order to get private messages. |
I use PhpStorm. It's a pretty good IDE.
You don't really need a to run PHP locally. Just create a dev area on your server and run it there. When you save a file in PhpStorm it can automatically upload it, so no need to jump through any complicated processes. And by running it on the server it will be the same exact environment as when you deploy it publicly, so no surprises down the road. |
Quote:
|
Quote:
Agreed :thumbsup I tried the demo.... It was ok but lacking. |
Quote:
And also notice the amount you pay goes down every year. |
I use Komodo for actual php editing, but since 2015 I have liked Bootstrap pages...
So I find a Bootstrap site package that looks interesting, then copy/paste the design elements into my Komodo .php page. And I use my MojoHost SQL, as well as Google Sheets as data sources. Like https://Coach-Karl.com or https://the-British-Beef.com or https://gay-dvds-for-women-and-men.com/ My sites are catalog pages, not member sites, and feature my self-built shopping cart, based on a plan from CCBill. CCBill is my payment processor. https://Porno-Mall.com is actually about 200 lines of .php, reading a massive Google Sheet. Yesterday, I found a "Heat Map" sample page in js. (For sales statistics for a Cam site I broadcast on.) I used Komodo to make a .php script to read data from my Google Sheet, then output the .txt file in the format that the HeatMap script needs. Which BTW, is .html and .js! Not that I really needed to do this, as I only have a couple of hours a day to broadcast during, but it is practice for something bigger in the future. Such would look more interesting for a model who is on longer hours, or on multiple shifts per day. http://www.coach-karl.com/ForumPics/HeatMap.png |
Quote:
Edit: I just installed phpstorm demo version. At a quick glance not much here that netbeans doesn't have. I'll stick with notepad++ |
Since 2005, I have written many hundreds of .php scripts, some with Bootstrap, .js, and more like Google Maps, using Komodo.
I edit my page, upload the file to my MojoHost account (either via FTP or the Komodo built-in FTP save option), and refresh my Chrome page. I never use a desktop environment, as what matters is the php runtime on MojoHost - with local files, SQL or Google Sheets data sources. |
php.net is the source reference.
You can use StackOverflow as a reference. Use a fresh Google page to search on your php question. It will generally find a half-dozen StackOverflow threads. Usually better to not pose a direct question on SO, but rather to use Google to search for previous threads. It will also find references on W3Schools, and other industry specific forums. Reading SO threads can be a bit tedious. The OP states the question, then others jump in with wrong answers and misinformation - like here. So you do need to read all the way to the bottom, then by trial and error, find what works best for your instance. |
All times are GMT -7. The time now is 02:39 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc