开发者

How I can create installer for website. PHP mysql [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_开发技巧Closed 10 years ago.

I have a website which made.

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.

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

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

I try using

$text = file_get_contents();

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/

These are collected from a blogpost by 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.


There is no universal standard for deploying PHP apps. Provide a tarball containing the PHP files in a directory, as well as the SQL schema, sample configuration file, and deployment documentation.


You can try to set check_foreign_keys = 0 ; then import the tables from the file and you need to have config.php world writable if you whant the web app to write the initial config to it.

Best regards, FR

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜