메뉴 건너뛰기

자료실

DATA

1 확인[편집]

root@zetawiki:~# apt list php-mbstring
Listing... Done
php-mbstring/xenial,xenial 1:7.0+35ubuntu6 all
console
 
root@zetawiki:~# php -m | grep mbstring
root@zetawiki:~# php -r "mb_strlen();"
PHP Fatal error:  Uncaught Error: Call to undefined function mb_strlen() in Command line code:1
Stack trace:
#0 {main}
  thrown in Command line code on line 1
console
 

2 설치[편집]

root@zetawiki:~# apt install php-mbstring
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  php7.0-mbstring
The following NEW packages will be installed:
  php-mbstring php7.0-mbstring
0 upgraded, 2 newly installed, 0 to remove and 36 not upgraded.
Need to get 467 kB of archives.
After this operation, 1,508 kB of additional disk space will be used.
Do you want to continue? [Y/n]
console
 
Get:1 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 php7.0-mbstring amd64 7.0.15-0ubuntu0.16.04.4 [465 kB]
Get:2 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 php-mbstring all 1:7.0+35ubuntu6 [1,940 B]
Fetched 467 kB in 0s (1,202 kB/s)        
Selecting previously unselected package php7.0-mbstring.
... (생략)
Processing triggers for php7.0-fpm (7.0.15-0ubuntu0.16.04.4) ...
console
 

3 확인 2[편집]

root@zetawiki:~# apt list php-mbstring
Listing... Done
php-mbstring/xenial,xenial,now 1:7.0+35ubuntu6 all [installed]
console
 
root@zetawiki:~# php -m | grep mbstring
mbstring
console
 
root@zetawiki:~# php -r "mb_strlen();"
PHP Warning:  mb_strlen() expects at least 1 parameter, 0 given in Command line code on line 1