PHP operation memcached Cache for the implementation of the code to increase and remove data, 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! ';} The stored value, where the Xian string, can also be an array, an object, but not a resource $val = $memcache->get (' key1 ');//query Gets the value echo $val; $memcache->replace (' Key1 ', ' Beijing ', memcache_compressed,60);//Modify $memcache->delete (' key1 ');//Delete?>
How to use Php+mysql to achieve the Web page additions and deletions can be changed? Just talk about the exact process.
Ho, this is not a small background operation.
Give a thought: make a table, use a foreach loop to print out the table information, and present in the table table, in the form of the last two TD to write the edit, delete, as for the increase to single open the page, edit the ID to pass the past, Remove all values of the ID at once and pay the value to be relevant, delete is simpler, delete the row data from the table based on the passed ID.
As for uploading images, you want to encapsulate the image processing library, simply pass the name of the image, through the $_files global variables related operations, such as the evaluation of the upload file suffix, size and upload failed to present to the customer information.
PHP Package A class can be implemented MySQL database additions and deletions to search
Look at the mess Ah!
http://www.bkjia.com/PHPjc/864475.html www.bkjia.com true http://www.bkjia.com/PHPjc/864475.html techarticle PHP operation memcached Cache for the implementation of the data phpmemcached Code, Core code: php//Create a Memcache object instance $memcache = new Memcache;if (!$ Memcache-connec ...