首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

从一个bug谈rtrim

本来以为得到的结果会是“战争”,但实际输出的却只有“战”。 不明所以,以为是 rtrim 的问题。查了一下,原来是自己对 rtrim 的理解有误。 rtrim 函数原型: string rtrim ( string str [, string charlist] ) 仔细看了下手册中charlist的解释: You can also specify the characters you want to strip, by means of the charlist parameter. Simply list all characters that you want to be stripped. 它的实际意思应该是:以每个字符为单位从目标字符串的右端开始查找,如果该字符在 trim 函数的第二个参数中,就将其删掉,直到当前字符不在参数列表中为止。而并非是我先前以为的:从str 的串尾去掉固定字串charlist。

02

nagios 3.X pnp-0.4.3

nagios 3.X pnp-0.4.3 配置小记 作者:刘宇 liuyu.blog.51cto.com 配置环境:cetnos5 apache2 nagios3  pnp-0.4.3 安装过程 引用石头兄的话: 1. compile php with zlib and gd option; 2. configure and make install the pnp; 3. modify the nagios.cfg and command.cfg with the process_perfdata and host/service_data option; 4. rename PNP‘s templates.dist as templates; 此步骤不是必须的(不过改了也没问题) 5. rename all PNP’s cfg_sample files _sample suffix; 6.Action_url: action_url,在2.x中,只能通过serviceextinfo来做。在3.x中,可以通过模板来继承,因此在3.x中,配置量会减少很多(特别是太规模部署时) 本文不详细介绍安装过程:看官方文档 [url]http://www.pnp4nagios.org/pnp/install[/url] 如果你是用的centos5 像zlib gb rrdtool 可以直接使用yum 方法来源:linuxtone.org  [netseek兄弟]

01
领券