php怎么安装calendar扩展
2022-12-02 09:01:16
230
{{single.collect_count}}

php安装calendar扩展的方法:首先查找当前使用的的php版本;然后找到相对应的php版本,下载上传到服务器并解压;接着找到并修改php.ini文件;最后添加calendar扩展模块,并重启php-fpm即可。

php入门到就业线上直播课:进入学习
Apipost = Postman + Swagger + Mock + Jmeter 超好用的API调试工具:点击使用

本文操作环境:linux5.9.8系统、PHP5.6.24 版,DELL G3电脑

php添加calendar扩展模块

#首先查找当前使用的的php版本[root@server1 src]# /usr/local/bin/php --versionPHP 5.6.24 (cli) (built: Aug 25 2016 12:14:39)Copyright © 1997-2016 The PHP GroupZend Engine v2.6.0, Copyright © 1998-2016 Zend Technologieswith Zend OPcache v7.0.6-dev, Copyright © 1999-2016, by Zend Technologies#找到相对应的php版本,下载、上传到服务器并解压#重新编译php#phpize是否在对应的目录下[root@server1 ~]# ll /usr/local/php/bin/phpize-rwxr-xr-x. 1 root root 4534 Jul 11 2018 /usr/local/php/bin/phpize[root@server1 ~]#/usr/local/php/bin/phpize[root@server1 php-5.6.24]# cd ext/calendar/[root@server1 calendar]# pwd/usr/local/src/php-5.6.24/ext/calendar#php-config是否在对应的目录下[root@server1 calendar]# ll /usr/local/php/bin/php-config-rwxr-xr-x. 1 root root 3392 Jul 11 2018 /usr/local/php/bin/php-config[root@server1 calendar]#./configure —with-php-config=/usr/local/php/bin/php-config —enable-calendar[root@server1 calendar]#make & make install#修改php.ini[root@server1 calendar]# cd /usr/local/php/etc/[root@server1 etc]#vim php.ini#添加对应的模块[curl]extension_dir = /usr/local/php/lib/php/extensions/no-debug-zts-20131226/extension = calendar.so#重启php-fpm/etc/init.d/php-fpm restart#查看calendar模块是否添加成功,如果有calendar,则该模块添加成功[root@server1 etc]# php -m| grep calendarcalendar#至此大功告成
登录后复制

推荐学习:《PHP视频教程

以上就是php怎么安装calendar扩展的详细内容,更多请关注php中文网其它相关文章!

回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}