PHP安装程序脚本 [英] PHP Installer Script

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

问题描述

可能重复:
如何为网站创建安装程序. PHP mysql

Possible Duplicate:
How I can create installer for website. PHP mysql

我正在为使用PHP的稍微复杂的Web应用程序创建一个功能齐全的安装程序.基本上,您转到URL/setup.php并被询问一系列问题,在此过程中,将根据给定的答案建立数据库并填充配置文件.一个很好的例子就是Wordpress如何处理其安装过程以及任何数量的PHP应用程序.

I'm looking to create a fully functional installer for a slightly complicated web application using PHP. Basically, you go to URL/setup.php and you are asked a series of questions, and during the process a database is set up and a config file is populated according to the answers given. A good example of this is how Wordpress handles its install procedure, as well as any number of PHP applications.

我向您提出的问题,噢,很棒的互联网,是这样的: 这项技术如此普遍,以至于肯定不是每个人都在重新发明轮子,是否有地方我可以找到该技术的基本演练(不是代码,只是描述).是那本还是一本好书,概述了如果不是这种特定技术,那么与之相关的基本原理?

My question to you, oh great internet, is this: This technique is so prevalent that surely not everyone is re-inventing the wheel, is there a place I can go to find a basic walkthrough (not code, just a description) of the technique. Either that or a good book which outlines if not this specific technique, then the fundamentals relevant to this?

我可以弄出一些丑陋的东西,也许自己动手做,但是如果有最知名的方法,我想找到它.

I can bang out something ugly and probably make it work myself, but if there's a best known method I'd like to find it.

最重要的是要具有工作功能的描述,这是逐步进行的事情.我想要安装程序,但我真的很想学习安装方法.

Far more important than having a working function is to have a description of what's going on from step to step. I'd like to have the installer, but I really want to learn how it's done.

谢谢, 迈克

推荐答案

我制作了自己的安装脚本,这是我的提示.

I've made my own installer script and here are my tips.

  1. 确保验证脚本将运行(文件和数据库权限)
  2. 确保文件夹/文件/数据库结构不存在(如果脚本之前已经运行过)
  3. 在这种情况下,请确保有一个选项来删除这些文件
  4. 始终牢记,用户/脚本可能会在所有地方失败,并且应该始终可以重新开始

这篇关于PHP安装程序脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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