我试图在我的 Code Igniter 模型中重用变量,但我不能完全理解语法。我遇到的问题在第 4 行。
class Products_model extends CI_Model {
var $gcsServerIpAddress = "11.22.33.44";
var $gcsServerAddress = "http://".$this->gcsServerIpAddress."/eft/";
我尝试过对象语法:$this->foo。我也尝试过使用变量名:$foo。他们都没有工作。有什么建议么?