Home>

1, lead to problems:

There are two classes, db and base, in ucenter. It happens that these two classes also exist in thinkphp, so problems are inevitable.

db class:uc_client/lib/db.class.php

base class:uc_client/model/base.php

2. Problem solving method:

Just eliminate the "duplicate name",So choose to change the name in ucenter.

3. The actual operation method:

db class:

Change db.class.php file

class db {changed to class uc_db {

Change uc_client/model/base.php file

Change $this->db=new db ();in init_db function to $this->db=new uc_db ();

base class:

Change uc_client/model/base.php file

Change class base {to class uc_base {

Change the base in the classes in all files in the uc_client/control/directory to uc_base, that is, inherit uc_base

Take uc_client/control/app.php as an example

Change class appcontrol extends base {to class appcontrol extends uc_base {

php
  • Previous AngularJS basic ng-mouseenter instruction sample code
  • Next jQuery imitation Jingdong Mall staircase navigation positioning menu