For help, A. php introduces B. php and cannot obtain the aclass attribute under B.

Source: Internet
Author: User
For help, A. php introduces B. php and cannot obtain the attribute A page of aclass under B.

 Cache;?>


Page B

 X = $ x; $ this-> y = $ y;} // connect to the memcache of Sina sae. you need to activate $ mem = memcache_init (); $ this-> cache = memcache_get ($ mem, "cache"); // get Tokenif (empty ($ this-> cache )) {$ this-> cache = "mmmm"; memcache_set ($ mem, "cache", $ this-> cache, 0,7200 ); // the expiration time is 7200 seconds. }}?>


Memcache is from Sina SAEs. you can view the cache value of memcache directly on Sina platform, but it cannot be obtained through page. The syntax is correct. Depressing
Please advise. Php I just learned yesterday.


Reply to discussion (solution)

Class wxClass
{
Var $ x = X;
Var $ y = Y;

Add one sentence: public $ cache = 1;
What is the result of page?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.