致命错误:不能够进入此空值,位于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. linux之模拟简单登录的脚本

    脚本如下: 运行结果:

  2. 十个JAVA程序员容易犯的错误

    十个JAVA程序员容易犯的错误 1. Array 转 ArrayList 一般开发者喜欢用: List<String> list = Arrays.asList(arr); Arrays. ...

  3. 依赖注入及AOP简述(二)——工厂和ServiceLocator .

    2.2.    工厂模式 基于手工构建组件的诸多弱点,1995年“大师4人组”(GoF)在其经典著作<DesignPatterns>一书中提出了“工厂模式”,这种模式在一定程度上有效的解决 ...

  4. CentOS 安装nload(流量统计)

    yum install gcc gcc-c++ ncurses-devel wget http://www.roland-riegel.de/nload/nload-0.7.2.tar.gz tar ...

  5. 【Tarjan,LCA】【3-21个人赛】【problemD】

    Problem D Time Limit : 6000/3000ms (Java/Other)   Memory Limit : 65535/32768K (Java/Other) Total Sub ...

  6. document_createElement

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...

  7. EF6 Codefirst+MySql 数据库迁移

    简介 项目使用MSSql作为数据库,但是因为SQL服务器贵那么一点,并发连接差那么一点,要把数据迁移到MySQL,顺带迁移过程以及问题. 环境 Visual Studio 2013 MySQL 5.7 ...

  8. js获取url传递参数的写法

    获取url地址?后面参数值的写法 正则: function GetQueryString(name) { var reg = new RegExp("(^|&)"+ nam ...

  9. C# 封装 System.Data.SQLite

    参考1: 关于如何使用System.Data.SQLite的入门: http://www.dreamincode.net/forums/topic/157830-using-sqlite-with-c ...

  10. Metafunction

    Metafunction is a more general idiom than type generator. Metafunctions that produce type(s) as a re ...