致命错误:不能够进入此空值,位于E:\sunlion\web\down\class\db_sql.php

代码 
<?php 
Class TestClass1{ 
var $class2; 
public function TestClass1(){ 
$this-> $class2 = new TestClass2(); 


Class TestClass2{ 
var $aaaa="1111111"; 

$ccc = new TestClass1(); 
echo $ccc-> $class2-> $aaaa; 
?>

错误的地方: 
$this-> $class2 = new TestClass2(); 
改为$this-> class2 = new TestClass2(); 
$this-> 后的变量不带$符

Cannot access empty property的更多相关文章

  1. php加密解密功能类

    这两天突发奇想想要用php写一个对日常项目加密以及解密的功能,经过努力简单的封装了一个对php代码进行加密解密的类,一些思想也是来自于网络,初步测试用着还行,可以实现对指定项目的加密以及解密(只针对本 ...

  2. JavaPersistenceWithHibernate第二版笔记-第五章-Mapping value types-001Mapping basic properties(@Basic、@Access、access="noop"、@Formula、@ColumnTransformer、@Generated、 @ColumnDefaul、@Temporal、@Enumerated)

    一.简介 在JPA中,默认所有属性都会persist,属性要属于以下3种情况,Hibernate在启动时会报错 1.java基本类型或包装类 2.有注解 @Embedded 3.有实现java.io. ...

  3. Hibernate逍遥游记-第3章对象-关系映射基础-access="field"、dynamic-insert、dynamic-update、formula、update=false

    1. package mypack; import java.util.*; public class Monkey{ private Long id; private String firstnam ...

  4. [Angular 2] Template property syntax

    This lesson covers using the [input] syntax to change an element property such as “hidden” or “conte ...

  5. [SoapUI] Property Expansion in soapUI

    1. Property Expansion in soapUI SoapUI provides a common syntax to dynamically insert ("expand& ...

  6. Fluent Python: @property

    Fluent Python 9.6节讲到hashable Class, 为了使Vector2d类可散列,有以下条件: (1)实现__hash__方法 (2)实现__eq__方法 (3)让Vector2 ...

  7. 一文了解python的 @property

    参考自: https://www.programiz.com/python-programming/property Python为我们提供了一个内置装饰器@property,此方法使得getter和 ...

  8. 看懂mysql执行计划--官方文档

    原文地址:https://dev.mysql.com/doc/refman/5.7/en/explain-output.html 9.8.2 EXPLAIN Output Format The EXP ...

  9. Yii的学习(5)--Active Record的关联

    官网原文:http://www.yiiframework.com/doc/guide/1.1/zh_cn/database.arr 官网中后半段为英文,而且中文的内容比英文少一些,先放到这里,之后有时 ...

随机推荐

  1. flex-linkbutton

    LinkButton 控件是没有边框的 Button 控件,当用户将鼠标移动到该控件位置时,其内容将加亮显示.这些特征通常借助包含在浏览器页面中的 HTML 链接进行展示.为使 LinkButton ...

  2. C# 3.0 { get; set; } 默认值

    .NET Framework 3.5 使用的是 C# 3.0,C# 3.0 有一些新的语言特性,其中有一项就是快捷属性. 之前的写法: private int _id = 0;public int I ...

  3. UVA 489-- Hangman Judge(暴力串处理)

     Hangman Judge  In ``Hangman Judge,'' you are to write a program that judges a series of Hangman gam ...

  4. Spring Http Invoker

    配置例如以下: ①web.xml配置 <servlet> <servlet-name>remote</servlet-name> <servlet-class ...

  5. Java内存泄漏分析与解决方案

    Java内存泄漏是每个Java程序员都会遇到的问题,程序在本地运行一切正常,可是布署到远端就会出现内存无限制的增长,最后系统瘫痪,那么如何最快最好的检测程序的稳定性,防止系统崩盘,作者用自已的亲身经历 ...

  6. 【贪心】【TOJ4107】【A simple problem】

    Given three integers n(1≤n≤1018), m(1≤m≤105), k(1≤k≤1018). you should find a list of integer A1,A2,- ...

  7. 【类克鲁斯卡尔做法+枚举最小边】【HDU1598】【find the most comfortable road】

    题意:  给你一个图,有边权,K个询问:u到v 的路径中   边权最大值-边权最小值的最小值是多少 http://acm.hdu.edu.cn/showproblem.php?pid=1598 题解( ...

  8. javascript之函数节流

    对于高频率的事件触发,为了优化页面性能,我们一般会对其做函数节流.比如: resize.keydow.scroll事件等.用户的频繁操作,会导致事件高频率的执行,这样会出现页面抖动啊.频繁调接口啊等问 ...

  9. Hadoop安装(2)安装hadoop 前的centos 设置

    将虚拟机网络连接设为:Bridged 添加用户:hadoop,设置密码.关闭防火墙,selinux.暂且不关闭不需要的任务. 参照:http://www.cnblogs.com/xia520pi/ar ...

  10. EC读书笔记系列之20:条款53、54、55

    条款53 不要轻忽编译器的警告 记住: ★严肃对待编译器发出的警告信息.努力在你的编译器的最高(最严苛)警告级别下争取“无任何警告”的荣誉 ★不要过度依赖编译器的报警能力,∵不同的编译器对待事情的态度 ...