Download the PHP package jimchen/gb-t-2260 without Composer

On this page you can find all versions of the php package jimchen/gb-t-2260. 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 gb-t-2260

GB/T 2260

中华人民共和国国家标准 GB/T 2260 行政区划代码

tb-t-2260,为什么会是一个这个丑的字符串呢?很简单,因为 GB/T 2260 进行简单的「中横线处理」后就是了。(比较符合程序员思维,你懂我的意思吧?)

GB/T 2260 国家推荐县级以上行政区规划代码,记住,很多仓库都忽略了 T,这个 T 就是推荐的意思,国家发布的标准是 GB/T 而不是 GB(国标)哟!

那么这个仓库做的事情很简单,就是将最新的 GB/T 2260 数据整理后提供给你,所以这个仓库是不包含代码的,但是对不同的语言和包管理工具提供了不同的使用方法,但是使用的数据源都是一个。

允许使用途径

使用

无论你用何种方式,使用的 RAW 内容均为 resources/gb-t-2260.json 这一份文件的内容,它的结构很简单,下面是一份预览:

其中 Key 就是行政代码,而 Value 就是代码对应的地区县名称。

PHP

使用 PHP 版本,你可以使用 Composer 快速的下载:

下载后,这个包提供了地区 JSON RAW 文件和一个 PHP 常量,常量叫做 GBT2260_RAW_PATH,顾名思义,这个常量就是记录的 JSON RAW 文件的路径,得到路径你就可以自由操作了。例如:

JavaScript

你可以使用 NPM 或者 Yarn 任意一个工具,但是推荐你的项目是允许进行 require JSON 文件的导入功能的。

现在,你已经把 GB/T 2260 添加到你的项目中了,我们来使用使用一下吧!


All versions of gb-t-2260 with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
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 jimchen/gb-t-2260 contains the following files

Loading the files please wait ....