如何为网站创建安装程序. PHP MySQL的 [英] How I can create installer for website. PHP mysql

查看:90
本文介绍了如何为网站创建安装程序. PHP MySQL的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站.

我需要知道如何为该站点创建安装程序. 这意味着,当用户首次将网站上传到其托管时,他们可以选择插入其数据库详细信息.

I need to know how i can create a installer for this site. Meaning when user upload the site on to they host first time they get option to inset they database details.

用户插入他们的数据库详细信息,然后在config.php文件中进行更改.

User insert they database details which then they change in config.php file.

我也有喜欢运行查询的table.sql

also i have tables.sql which i like to run query

我尝试使用

$text = file_get_contents();

但是我的查询失败,因为我确实有大约32个表,我需要插入数据库和所有必要的设置.

but my querys fails as i do have around 32 tables i need to inset into database and all the necessary setting.

推荐答案

有许多旨在实现此目的的工具,它们具有不同的功能集:

There is a number of tools that aim to achieve this, with different feature sets:

  • http://www.apphp.com/php-easyinstaller/
  • http://www.phpclasses.org/browse/package/3072.html
  • http://www.phpclasses.org/browse/package/2543.html
  • http://www.vadimg.com/2009/06/24/application-installer-wizard-class/
  • http://github.com/SunboX/Php-Web-Application-Installer
  • http://sourceforge.net/projects/upcase-project/
  • http://sourceforge.net/projects/zzossinstaller/
  • http://sourceforge.net/projects/phpappinstaller/
  • http://sourceforge.net/projects/piap/

这些是从 cweiske

  • http://cweiske.de/tagebuch/Generic%20PHP%20application%20installers.htm
  • http://kore-nordmann.de/blog/0097_php_web_installer.html

如果您不需要通用工具,最简单的方法是编写一个简单的安装脚本并要求用户运行它.这就像打印一个表格并询问所需详细信息的单个文件一样容易.提交后,执行必要的安装例程.

If you dont need a generic tool, the easiest would be to write a simple install script and ask users to run it. This can be as easy as a single file that prints a form and asks for the required details. When submitted, do the necessary install routines.

这篇关于如何为网站创建安装程序. PHP MySQL的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆