/** * Given a RiakClient, RiakBucket, Key, LinkSpec, and Params, * construct and return a URL for searching secondary indexes. * @author Eric Stevens <*****@*****.**> * @param RiakClient $client * @param RiakBucket $bucket * @param string $index - Index Name & type (eg, "indexName_bin") * @param string|int $start - Starting value or exact match if no ending value * @param string|int $end - Ending value for range search * @param array $params - Any extra query parameters to pass on the URL * @return string URL */ public static function buildIndexPath(RiakClient $client, RiakBucket $bucket, $index, $start, $end = NULL, array $params = NULL) { # Build 'http://hostname:port/prefix/bucket' $path = array('http:/', $client->host . ':' . $client->port, $client->indexPrefix); # Add '.../bucket' $path[] = urlencode($bucket->name); # Add '.../index' $path[] = 'index'; # Add '.../index_type' $path[] = urlencode($index); # Add .../(start|exact) $path[] = urlencode($start); if (!is_null($end)) { $path[] = urlencode($end); } // faster than repeated string concatenations $path = join('/', $path); # Add query parameters. if (!is_null($params)) { // Most users will have the http PECL extension if (func_exists('http_build_query')) { $path .= '?' . http_build_query($params, '', '&'); } else { // In case they don't have the http PECL extension $s = array(); foreach ($params as $key => $value) { $s[] = urlencode($key) . '=' . urlencode($value); } $path .= '?' . join('&', $s); } } return $path; }
<td bgcolor="#FFFFFF" align="center">2.0.34</td> <td bgcolor="#FFFFFF" align="center"><?php echo $gd_version ? $gd_version : '不支持'; ?> </td> <td bgcolor="#FFFFFF" align="center"><?php round($gd_version) >= 2 ? status(1) : status(2); ?> </td> </tr> <tr> <td bgcolor="#FFFFFF" align="center" height="28">函数依赖性检测</td> <td bgcolor="#FFFFFF" colspan="4"> <?php foreach ($func_items as $f) { echo $f . '() '; func_exists($f) ? status(1) : status(0); echo ' '; } ?> </td> </tr> <tr> <td bgcolor="#FFFFFF" align="center" height="28"> 服务器禁用的函数 </td> <td bgcolor="#FFFFFF" colspan="4" style="word-break:break-all; width:480px; padding:0 5px;"><?php $disFuns = get_cfg_var('disable_functions'); echo empty($disFuns) ? '无' : $disFuns; ?> </td> </tr> </table> <br />