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

x
?
Solved

An installer script for a  php script

Posted on 2007-10-12
4
Medium Priority
?
180 Views
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 ?
0
Comment
Question by:Desire2change
  • 2
4 Comments
 
LVL 17

Expert Comment

by:nplib
ID: 20066614
What do you exactly mean?
0
 

Author Comment

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

Accepted Solution

by:
nplib earned 1500 total points
ID: 20067185
There's no real tutorial.
You can look at this page
http://www.php.net/manual/en/ref.filesystem.php
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.
0
 
LVL 21

Expert Comment

by:nizsmo
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.
0

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