- CodeIgniter Web Application Blueprints
- Rob Foster
- 437字
- 2021-08-06 19:34:27
Installing and using Sparks
For a long time, you had to search the Internet and download code from various places—blogs, code repositories, and so on—to find and use extensions, libraries, and other useful snippets of code for CodeIgniter. Useful installations for CodeIgniter were spread across the Internet; as such, they might have been hard to locate. Sparks acts as a single point of reference for extensions of CodeIgniter. It's simple to install and use and contains thousands of useful add-ons for CodeIgniter:
- If you are using a Mac or Linux, then the command-line interface is open to you. Using the terminal application on your system, navigate to the root of your CodeIgniter application and enter the following line:
php -r "$(curl -fsSL http://getsparks.org/go-sparks)"
If your installation was successful, you should see something similar to the following:
user@server:/path/to/codeigniter$ php -r "$(curl -fsSL http://getsparks.org/go-sparks)" Pulling down spark manager from http://getsparks.org/static/install/spark-manager-0.0.9.zip ... Pulling down Loader class core extension from http://getsparks.org/static/install/MY_Loader.php.txt ... Extracting zip package ... Cleaning up ... Spark Manager has been installed successfully! Try: `php tools/spark help`
- If you are using Windows, then you will need to download Sparks and unpack it manually; to do that, follow these instructions or check out the instructions on the GetSparks website for the latest version:
- Create a folder called
tools
in the top level (root) or in your CodeIgniter directory. - Go to http://getsparks.org/install.
- Go to the Normal Installation section and download the Sparks package.
- Unpack the download into the
tools
folder you created in step 1. - Download the Loader class extension from http://getsparks.org/static/install/MY_Loader.php.txt.
- Rename the file
MY_Loader.php.txt
toMY_Loader.php
and move it to theapplication/core/MY_Loader.php
location in your CodeIgniter instance.
- Create a folder called
Now that Sparks is installed in your CodeIgniter instance, you can begin to install extensions and packages.
To install a package from Sparks, type the following in the command-line window:
php tools/spark install [Package Version] Spark Name
Here, Package Version
is the specific version of the Spark you wish to install. You are not required to state the version and, if you it out, Sparks will download the latest version by default. Spark Name
is the name of the Spark you wish to install; for example, to install example-spark
(version 1.0.0), which comes with the default installation, type the following in the command-line window:
php tools/spark install -v1.0.0 example-spark
If the installation was successful, you should see something similar to the following:
user@server:/path/to/codeigniter$ php tools/spark install -v1.0.0 example-spark [ SPARK ] Retrieving spark detail from getsparks.org [ SPARK ] From Downtown! Retrieving spark from Mercurial repository at https://url/of/the/spark/repo [ SPARK ] Spark installed to ./sparks/example-spark/1.0.0 - You're on fire!
- Kibana Essentials
- Effective C#:改善C#代碼的50個有效方法(原書第3版)
- LabVIEW入門與實戰(zhàn)開發(fā)100例
- Access 數(shù)據(jù)庫應(yīng)用教程
- Instant 960 Grid System
- C語言程序設(shè)計案例式教程
- Java Web應(yīng)用開發(fā)技術(shù)與案例教程(第2版)
- Easy Web Development with WaveMaker
- C語言程序設(shè)計學(xué)習(xí)指導(dǎo)與習(xí)題解答
- 飛槳PaddlePaddle深度學(xué)習(xí)實戰(zhàn)
- 零基礎(chǔ)入門學(xué)習(xí)Python(第2版)
- 機器學(xué)習(xí)與R語言實戰(zhàn)
- Java程序員面試筆試寶典(第2版)
- 深度學(xué)習(xí)原理與PyTorch實戰(zhàn)(第2版)
- Natural Language Processing with Python Quick Start Guide