Skip to content

Commit befeead

Browse files
committed
init
0 parents  commit befeead

8 files changed

+1580
-0
lines changed

.gitignore

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
.deps
2+
*.lo
3+
*.la
4+
.libs
5+
acinclude.m4
6+
aclocal.m4
7+
autom4te.cache
8+
build
9+
config.guess
10+
config.h
11+
config.h.in
12+
config.log
13+
config.nice
14+
config.status
15+
config.sub
16+
configure
17+
configure.in
18+
include
19+
install-sh
20+
libtool
21+
ltmain.sh
22+
Makefile
23+
Makefile.fragments
24+
Makefile.global
25+
Makefile.objects
26+
missing
27+
mkinstalldirs
28+
modules
29+
run-tests.php
30+
tests/*/*.diff
31+
tests/*/*.out
32+
tests/*/*.php
33+
tests/*/*.exp
34+
tests/*/*.log
35+
tests/*/*.sh
36+
cjieba/demo
37+
cjieba/lib/cjieba.o
38+
cjieba/lib/libcjieba.a
39+
*.so

README.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
2+
### functions
3+
```php
4+
array|bool phone(string $phone)
5+
```
6+
7+
### install
8+
```
9+
git clone https://github.com/jonnywang/phone.git
10+
cd phone
11+
phpize
12+
./configure
13+
make
14+
make install
15+
```
16+
17+
### php.ini
18+
```
19+
extension=phone.so
20+
phone.enable=1
21+
phone.dict_path=/Users/xingqiba/data/softs/phone/phone.dat
22+
```
23+
24+
### example
25+
```
26+
$result = phone('1367152');
27+
Array
28+
(
29+
[0] => 上海
30+
[1] => 上海
31+
[2] => 200000
32+
[3] => 021
33+
[4] => 1
34+
)
35+
```
36+
* 更新请参考example目录
37+
* 0 省份 1城市 2邮编 3区号 4号码类型(1移动 2联通 3电信 4电信虚拟运营商 5联通虚拟运营商 6移动虚拟运营商)
38+
39+
### contact
40+
更多疑问请+qq群 233415606 or [website http://www.hnphper.com](http://www.hnphper.com)
41+
42+

config.m4

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
PHP_ARG_ENABLE(phone, whether to enable phone support,
2+
Make sure that the comment is aligned:
3+
[ --enable-phone Enable phone support])
4+
5+
if test "$PHP_PHONE" != "no"; then
6+
PHP_SUBST(PHONE_SHARED_LIBADD)
7+
8+
PHP_NEW_EXTENSION(phone, phone.c, $ext_shared)
9+
fi

example/test_phone.php

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
print_r(phone(13671527966));

0 commit comments

Comments
 (0)