Home >Backend Development >PHP Tutorial >How to use php to call KyotoTycoon

How to use php to call KyotoTycoon

墨辰丷
墨辰丷Original
2018-06-11 17:28:441501browse

This article mainly introduces a simple example of php calling KyotoTycoon, involving the simple use method of php calling KyotoTycoon, which has certain reference value. Friends in need can refer to it

This article describes the example of php calling KyotoTycoon method. The details are as follows:

Kyoto Tycoon (KT for short) is one of the series of works by Mikio Hirabayashi, the author of Tokyo Tyrant. KT is a database network layer service. It provides a plug-in mechanism that can mount almost all database storage equipment.

A simple application example is provided here:

<?php
require_once &#39;Net/KyotoTycoon.php&#39;;
use Net\KyotoTycoon;
$cacheManager = new KyotoTycoon(array(
  &#39;host&#39; => &#39;localhost&#39;,
  &#39;port&#39; => 1978
));
$cacheManager->set(&#39;foo&#39;, &#39;bar&#39;);
$value = $cacheManager->get(&#39;foo&#39;);
echo $value . "\n";

Summary: The above is the entire content of this article, I hope it will be helpful to everyone's learning.

Related recommendations:

PHP form data verification class

PHP implements Chinese character verification code

PHP sends post, get request and operates cookies based on curl

php recursive traversal to achieve unlimited classification

PHP Read configuration file class instance

The above is the detailed content of How to use php to call KyotoTycoon. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn