Home Backend Development PHP Tutorial PHP Memcache 连接有关问题

PHP Memcache 连接有关问题

Jun 13, 2016 am 10:44 AM
connect long memcache string

PHP Memcache 连接问题!
使用Memcache的时候出现下列问题,是为什么?
Memcache::connect() expects parameter 2 to be long, string given in 
谢谢了

------解决方案--------------------

探讨

楼上两位.....
Memcache::connect ( string $host [, int $port [, int $timeout ]] )
第二个参数填端口号,长整形(long),你填的是string类型了,所以报错,哪是太长的意思
Statement of this Website
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Convert basic data types to strings using Java's String.valueOf() function Convert basic data types to strings using Java's String.valueOf() function Jul 24, 2023 pm 07:55 PM

Convert basic data types to strings using Java's String.valueOf() function In Java development, when we need to convert basic data types to strings, a common method is to use the valueOf() function of the String class. This function can accept parameters of basic data types and return the corresponding string representation. In this article, we will explore how to use the String.valueOf() function for basic data type conversions and provide some code examples to

How to use Memcache in PHP development? How to use Memcache in PHP development? Nov 07, 2023 pm 12:49 PM

In web development, we often need to use caching technology to improve website performance and response speed. Memcache is a popular caching technology that can cache any data type and supports high concurrency and high availability. This article will introduce how to use Memcache in PHP development and provide specific code examples. 1. Install Memcache To use Memcache, we first need to install the Memcache extension on the server. In CentOS operating system, you can use the following command

Use Java's String.replace() function to replace characters (strings) in a string Use Java's String.replace() function to replace characters (strings) in a string Jul 25, 2023 pm 05:16 PM

Replace characters (strings) in a string using Java's String.replace() function In Java, strings are immutable objects, which means that once a string object is created, its value cannot be modified. However, you may encounter situations where you need to replace certain characters or strings in a string. At this time, we can use the replace() method in Java's String class to implement string replacement. The replace() method of String class has two types:

2w words detailed explanation String, yyds 2w words detailed explanation String, yyds Aug 24, 2023 pm 03:56 PM

Hello everyone, today I will share with you the basic knowledge of Java: String. Needless to say the importance of the String class, it can be said to be the most used class in our back-end development, so it is necessary to talk about it.

Use java's String.length() function to get the length of a string Use java's String.length() function to get the length of a string Jul 25, 2023 am 09:09 AM

Use Java's String.length() function to get the length of a string. In Java programming, string is a very common data type. We often need to get the length of a string, that is, the number of characters in the string. In Java, we can use the length() function of the String class to get the length of a string. Here is a simple example code: publicclassStringLengthExample{publ

Convert a string to lowercase using java's String.toLowerCase() function Convert a string to lowercase using java's String.toLowerCase() function Jul 24, 2023 pm 11:52 PM

The String.toLowerCase() function is a very useful and common string processing function in Java, which can convert a string to lowercase. In this article, we will introduce how to use this function and give some related code examples. First, let's take a look at the basic syntax of the String.toLowerCase() function. It doesn't have any parameters, just call it. Here is the sample code: Stringstr="Hel

Use Java's String.startsWith() function to determine whether a string starts with a specified prefix Use Java's String.startsWith() function to determine whether a string starts with a specified prefix Jul 25, 2023 pm 02:27 PM

Use Java's String.startsWith() function to determine whether a string starts with a specified prefix. In Java programming, we often need to process and determine strings. One common operation is to determine whether a string begins with a specified prefix. Java provides the startsWith() function of the String class, which can easily implement this function. String's startsWith() function The String class is the most commonly used class in Java

How does the String.split() method in Java limit the length of the split array? How does the String.split() method in Java limit the length of the split array? Nov 18, 2023 pm 12:53 PM

The String class in Java provides the split() method for splitting a string into an array. When splitting a string, sometimes we need to limit the length of the split array. So, how do we limit the length of the array in the split() method? This will be explained below with specific code examples. In Java, the split() method of the String class has two overloaded forms: split(Stringregex)split(Stringregex,i

See all articles