有问题
class printnmae
{
var $name;
function show_name()
{
echo \n";
echo "The name is $this->name.","\n","\n";
echo "hellp! $this->name!","\n";"\n";
}
}
class printnmae
{
var $name;
function show_name()
{
echo \n";
echo "The name is $this->name.","\n","\n";
echo "hellp! $this->name!","\n";"\n";
}
}
{
var $name;
function show_name()
{
echo \n";
echo "The name is $this->name.","\n","\n";
echo "hellp! $this->name!","\n";"\n";
}
}在类的函数里面如果要调用当然类的变量一般要加上$this关键字,如果楼主对类不太熟悉的话可以看看thinking in java这本书,里面讲得很清楚