ice-php is a lightweight and high-performance PHP development framework designed to offer developers a clean API and an efficient development experience. With ice-php, you can rapidly build stable web applications, making it ideal for small, medium, or even large-scale projects.
Before installation, ensure that your server environment meets the following requirements:
On Linux or macOS, you can install Composer using the following commands:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
Windows users can download and install Composer from its official website by following the provided instructions.
After Composer is installed, run the following command to create a new ice-php project:
composer create-project --prefer-dist ice-php/ice-project my-project
Replace “my-project” with your desired project name.
Configuring the web server is essential for running your ice-php application. Below are examples for Apache and Nginx:
DocumentRoot "/path/to/my-project/public"
AllowOverride All
Require all granted
server {
listen 80;
server_name your_domain.com;
root /path/to/my-project/public;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.x-fpm.sock; # Adjust based on your PHP version
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Once everything is configured, open your browser and visit the domain or IP address you set up. If configured correctly, you'll see the ice-php welcome page, indicating a successful installation.
Run the following command in your project root directory to update the framework:
composer update
ice-php supports multiple databases, including MySQL and PostgreSQL. Choose the one that best fits your project's needs.
By following this guide, you've successfully installed the ice-php framework. From environment setup to server configuration, the process is straightforward and efficient. With ice-php, developing modern web applications becomes simpler and more productive.