小编Pra*_*raj的帖子

在PHP和Zend Framework中使用cofigs.ini的优点?

实际上,我的问题是

为什么我们在PHP中使用configs.ini文件?

使用configs.php和configs.ini有什么区别?

使用configs.ini文件的优点是什么?

php zend-framework config

2
推荐指数
1
解决办法
244
查看次数

如何访问子类中的父对象属性

其实,

这工作正常..但我想要父值.不是孩子的价值..

<?php
    class Fruit{
        protected $parentproperty = "parentvalue";// this is parent value       
    }

    class Orange extends Fruit{
        protected $parentproperty = "child value";// here i mentioned once again        
        function showParentProperty(){
            return self::$this->parentproperty;
        }


    }
    $obj = new Orange;
    echo $obj->showParentProperty();

    //conclusion:
    // i want to get the parent value not child. its working fine . but it's displaying chid value


?>
Run Code Online (Sandbox Code Playgroud)

php

1
推荐指数
1
解决办法
2359
查看次数

标签 统计

php ×2

config ×1

zend-framework ×1