Aller au contenu

Do you support phar (PHP Archive) files?

Ce contenu n’est pas encore disponible dans votre langue.

Yes. You can use phar (PHP Archive) files on Ruachost hosting.

A phar file packs a whole PHP application or library into a single file, much like a .jar file in Java. Many PHP tools are shipped this way, such as composer.phar and wp-cli.phar.

Connect to your account with SSH and run the file with PHP:

Terminal window
php composer.phar --version

You can also include a phar file in your own scripts:

<?php
require 'phar://mylibrary.phar/autoload.php';

If you see an error about the phar extension, check it’s switched on:

  1. Log in to cPanel.
  2. Open Select PHP Version.
  3. Click Extensions and make sure phar is ticked.

Cette page vous a-t-elle aidé ?