Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


An installer script for a  php script

Posted on 2007-10-12
Medium Priority
Last Modified: 2007-10-12
I want to make an installer for my php script, can anyone pls guide me on how to start or is there any tutorial related to this ?
Question by:Desire2change
  • 2
LVL 17

Expert Comment

ID: 20066614
What do you exactly mean?

Author Comment

ID: 20067103
i want to create a install.php for my php application, which will install the script.
LVL 17

Accepted Solution

nplib earned 1500 total points
ID: 20067185
There's no real tutorial.
You can look at this page
to get a list of file system functions.
But basically you need to decide where you want the files to be installed to.
Then check if the folders exists.
If they don't then create it them.
Create a file in the folder that you created, You need to place your code in a string, write that string to the file that was created on the server. Close the file.
Repeat for ever file.

OR to make it simpler,

From the install dir, have it copy the file contents to the folders that were created.

The link I sent will give you functions that you will need to perform these tasks.
LVL 21

Expert Comment

ID: 20069963
If you were thinking about installer script for a database through PHP (ie installing and setting up all the MySQL tables from a script) then all you need to do is compile a list of queries and execute them using mysql_query (provided that you are connected to the MysQL server already using MySQL_Connect).

Let me know if you want more information regarding this.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question