How to start creating a php script, that will be installed on many servers?
-
I was wondering how to start coding a script using php, and that script will be used on many websites. so should I start first by creating the database ? and then start creating php files that will process data from the database ? and should I start thinking of an install wizard for this script at first, or later when I finish the project I'll create one ? I'm really confused on how to start a project, can you please give me some advice ? and thanks everyone :D
-
Answer:
should I start first by creating the database? If you are going to use a database in your PHP script, then yes, you should install a database first. MySQL is a good start. and then start creating php files that will process data from the database? I would start on one server first, and create one PHP file called index.php that will do a database query. Then work your way to multiple PHP files from there. and should I start thinking of an install wizard for this script at first, or later when I finish the project I'll create one. Installing PHP files is 90% of the times as simple as just copying them onto your new server. I wouldn't worry about an install wizard just yet. Another general tip because you are a beginner: install http://www.wampserver.com/en/, it is a webserver/PHP server/MySQL Server in one that runs on your local computer. This is great for developing because you can just put your PHP files in C:\WAMP, edit them and directly see the result in your browser through http://localhost/. Then when you are happy you can upload to the server, or multiple servers. (Just by copying).
Peter at Stack Overflow Visit the source
Other answers
Most php software does not have, or need for that matter, what you would call an install wizzard. I would suggest you to develop whichever way feels most natural to you. Some people find it easier to start with the database design, while others prefer to write some code first and then expand the db schema further. There really is no right way to do it. Starting a PHP project can be as easy as creating a text file and pumping out lines of code, however if you plan on creating a sizeable project, I would suggest a fully featured IDE.
code_burgar
Decide what dependencies your script has. Decide which minimum version of PHP the script will be compatible with. Work out a script which queries the users setup to detect whether these conditions are met or not. (eg does it rely on the mysql extension to be installed). Detail how to meet each of the dependencies in case they are missing. Explain which is the minimum version number supported, if your script detects it is below that version number. Test it on your target Operating Systems. Run a script which creates a database, test whether that was created. Provide detailed instructions on how to do this manually, and how to provide the correct privileges. If necessary give them a config file which permits them to enter key information such as doc_root etc. Conform to common wisdom such as short_tags = off else override these settings. Imagine the user is on shared hosting and is running on safe_mode = on. Try and follow your own instructions and re-install it on your localhost, then on a live server - ideally on a variety of OSs too.
Cups
Related Q & A:
- How to start programming a game in java?Best solution by Game Development
- How to dynamically create a PHP class name on the fly?Best solution by stackoverflow.com
- How to call a function with parameter in a bash script?Best solution by tldp.org
- How do you submit a movie script?Best solution by Yahoo! Answers
- How to start off a conversation on MSN?Best solution by eHow old
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.