Download the PHP package meshell/ffi-opencc without Composer

On this page you can find all versions of the php package meshell/ffi-opencc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ffi-opencc

ffi-opencc

该项目是将中文简体转换成繁体,使用rust构建动态链接库来给php调用。 该库主要是为了提高php转换繁体字的性能而构建(特别是长文章)。

环境

需要php >= 7.4 以上的版本并且开启了FFI扩展。如果你需要自己编译库还需要装rust 工具链。

还需要设置php.ini 中的ffi.enableOn

该库需要依赖opencc库。

目前有两种方式来构建依赖。

  1. 手动安装opencc

    比如: yum install opencc 或者 apt-get install opencc 甚至还你可以自己编译

  2. 为库目录下的lib/libopencc.so.1.1.2创建软链

该目录不支持window环境,如果你需要请自行编译。

Usage

该库提供六种转换用法:简转繁,繁转简,简转繁,繁转简,简转繁,繁转简。

以上程序执行后的结果:

简体转繁体: 頭可斷,血可流

繁体转简体: 台湾省,是中华人民共和国法定的34个省级行政区之一,也是中华人民共和国法律上的两个岛屿省份之一,其辖区包括台湾岛及其附属岛屿、澎湖列岛等地

简体转台正繁体: 頭可斷,血可流

台正繁体转简体: 台湾省,是中华人民共和国法定的34个省级行政区之一,也是中华人民共和国法律上的两个岛屿省份之一,其辖区包括台湾岛及其附属岛屿、澎湖列岛等地

简体转香港繁体: 頭可斷,血可流

香港繁体转简体: 头可断,血可流

在线转换

FAQ


All versions of ffi-opencc with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-ffi Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package meshell/ffi-opencc contains the following files

Loading the files please wait ....