是否可以为使用 Codeigniter 构建的应用程序创建安装程序

发布于 2024-12-22 01:43:51 字数 125 浏览 2 评论 0原文

我正在使用 Codeigniter 构建一个 Web 应用程序,它将在本地主机上运行。有没有办法为它创建一个安装程序,以便任何用户都可以像 Windows 上的常规软件一样安装它(包括 XAMPP 服务器)?

谢谢 :)

I am building a web application using Codeigniter, which will be running on localhost. Is there any way to create an installer for it so that any user can install it (including XAMPP server) like regular software on windows?

Thanks :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

夜巴黎 2024-12-29 01:43:51

试试这个 GoInstaller

什么是 GoInstaller? GoInstaller 是带有用户界面 (UI) 的 CodeIgniter 安装程序。

如何使用?

  • 下载

  • 将安装文件夹放在 codeigniter 文件夹的根目录内

  • 在资产 -> sqlcommand 上打开 SQL 命令文件。 sql

  • 将 SQL 命令添加到 install.sql

  • 确保您的 codeigniter 数据库(application->config->database.php) 为 cmod 777

  • 打开 http://(您的链接)/install

  • 填写表格,主机名,用户名等

  • 您的URL网站是安装程序完成后重定向到您的网站的链接

    >

  • 完成

Try this GoInstaller

What is GoInstaller? GoInstaller is installer for CodeIgniter with user interface (UI).

How to use?

  • Download

  • Place the install folder inside/root the codeigniter folder

  • Open SQL command file on assets->sqlcommand.sql

  • Add command SQL into install.sql

  • Make sure your codeigniter database (application->config->database.php) to cmod 777

  • Open http://(Your Link)/install

  • Fill the form ,Hostname, Username, etc

  • Your URL website is link to redirect to your website after the installer is done

  • Done
垂暮老矣 2024-12-29 01:43:51

我认为你最好使用 Phar 之类的东西来压缩和分发您的申请。您可以自己开发,利用 __HALT_COMPILER 等,但是 Phar 应该支持您需要的大部分内容。

为 PHP 应用程序创建二进制安装程序(原型 setup.exe)不太可能是一个好的决定,因为大多数使用共享托管提供商的人无法做到这一点执行应用程序并将其安装到服务器。

Web 安装程序不仅更便携,而且通常符合 Web 应用程序安装过程的预期。此外,用 PHP 编写安装程序允许您在安装过程中使用现有的代码库来执行诊断、兼容性检查以及基本上您需要的任何操作。

I think you're better off using something like Phar to compress and distribute your application. You could roll your own, taking advantage of __HALT_COMPILER, etc., however Phar should support most anything you need.

Creating a binary installer for a PHP application (the prototypical setup.exe) is not likely to be a good decision, as most people using shared hosting providers are not going be able to execute and install the application to the server.

A web installer is not only more portable, but typically what's expected for web application installation procedures. Also, writing the installer in PHP allows you to use your existing codebase during the installation procedure to perform diagnostics, compatibility checks, and essentially anything you need.

不即不离 2024-12-29 01:43:51

您可以在数据库配置文件中使用空值创建 CI 应用程序,然后使用 CI 根据表单(例如 mysql 主机、用户名、密码)的输入对文件内容进行查找/替换。

步骤 1:创建一个表单,验证条目,然后在将它们提交到文件之前检查数据库值是否正确(使用类似以下内容:

$config['hostname'] = $this->input->post('hostname');
$config['username'] = $this->input->post('username');
$config['password'] = $this->input->post('password');
$config['database'] = $this->input->post('database');

$this->load->database($config); 

如果一切正常,则对 database.php 文件中的数据库条目进行查找/替换 虽然使用此方法,

但您无法将数据库放入 autoload.php 文件中(除非在安装成功运行后也将其替换)。

在 CI 版本 2 中,其他所有内容几乎都会自行解决,例如路径等。

You could create the CI app with empty values in the database config file then use CI to do a find/replace on the contents of the file based on the inputs from a form e.g. mysql host, username, password.

Step 1: Create a form, validate entries, then check the db values are correct before committing them to the file (use something like:

$config['hostname'] = $this->input->post('hostname');
$config['username'] = $this->input->post('username');
$config['password'] = $this->input->post('password');
$config['database'] = $this->input->post('database');

$this->load->database($config); 

If that all works correctly then do your find/replace on the database entries in the database.php file in config.

You couldn't put database in the autoload.php file though using this method (unless you replace that too after setup has run successfully).

In CI version 2 onwards everything else pretty much sorts itself out eg paths etc.

绾颜 2024-12-29 01:43:51

我过去曾使用过 Appcelerator 来完成类似的事情。效果很好!

I've used Appcelerator in the past for something like that. Works great!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文