就像现在一样,我将我的类系统嵌入到我的核心类中.所以我这样称呼我的课程:
$cms->userClass->function();
Run Code Online (Sandbox Code Playgroud)
但这意味着对于我在userClass中的每个函数,我总是需要添加:
global $cms;
Run Code Online (Sandbox Code Playgroud)
为此能够访问数据库类:
$cms->db->function();
Run Code Online (Sandbox Code Playgroud)
有没有办法为整个类设置全局,而不是必须在每个函数的开头定义它?
我不知道这里发生了什么.我已经尝试过我能找到的每一个在线修复,并且无法获得任何工作.
清除不会工作,我不能用户溢出:auto,因为我将导航定位在包装器之外.这是错误的例子:
下面是代码,可以在这里使用一些帮助.
@CHARSET "ISO-8859-1";
* {margin:0;padding:0;}
html, body
{
background-color: #dcdcdc;
padding: 0px;
margin: 0px;
height: 100%;
font-family: Tahoma, Arial;
}
#wrapper
{
border-top: 1px white solid;
width: 1100px;
min-height: 100%;
margin: auto;
background-color: #fff;
}
#headerBlue
{
width: 1086px;
height: 110px;
margin: auto;
margin-top: 7px;
background-image: url('http://plustg.com/v2/_img/blue/header.png');
background-repeat: no-repeat;
}
#headerPink
{
width: 1086px;
height: 110px;
margin: auto;
margin-top: 7px;
background-image: url('http://plustg.com/v2/_img/pink/header.png');
background-repeat: no-repeat;
}
#userStuff
{
float: left;
width: 216px;
height: 88px;
margin-top: 10px;
margin-left: 350px; …Run Code Online (Sandbox Code Playgroud)