Php implements code for adding, deleting, modifying, and querying data through the memcached cache, phpmemcached. Php implements code for adding, deleting, modifying, and querying data through memcached caching. phpmemcached core code: php creates a memcache object instance $ memcachenewMemcache; if (! $ Memcache-connec php implements code for adding, deleting, modifying, and querying data by operating on the memcached cache, phpmemcached
Core code:
<? Php // Create a memcache object instance $ memcache = new Memcache; if (! $ Memcache-> connect ("127.0.0.1", 11211) {die ('connection failed');} if ($ memcache-> set ('key1', "xian ", MEMCACHE_COMPRESSED, 60) {echo 'sucess! ';} // Save the value. The xian string can also be an array and an object, but cannot be a resource $ val = $ memcache-> get ('key1 '); // query the obtained value echo $ val; $ memcache-> replace ('key1', 'beijinging', MEMCACHE_COMPRESSED, 60 ); // modify $ memcache-> delete ('key1'); // delete?>
How can I use php + MySQL to add, delete, modify, and query webpages? Let's talk about the specific process.
Isn't that a small background operation.
Let's give a thought: create a table, print the information of the table in a foreach loop at a time, and present it in the table. write edit and delete in the last two td files of the table, as for the addition, you need to open the page. when editing, pass the id to the past, retrieve all the values of the id at a time and pay the relevant value. this is easier to delete, delete the row of data in the table based on the uploaded id.
As for uploading images, you need to encapsulate them into the image processing library. you only need to pass the image name and perform related operations using the $ _ FILES global variable, such as determining the suffix, size, and information presented to the customer after the upload fails.
Php encapsulates a class to add, delete, modify, and query mysql databases.
Look messy!
Idea core code: php // Create a memcache object instance $ memcache = new Memcache; if (! $ Memcache-connec...