<?php
class Site{
public $title='';
function __construct(){
include('includes/layout/head.php');
}
public function Title($a){
echo $a;
$a=$this->title;
}
}
?>
Как да направя че стойноста във title( ) да е равна на public $title :?
Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<?php
class Site{
public $title='';
function __construct(){
include('includes/layout/head.php');
}
public function Title($a){
echo $a;
$a=$this->title;
}
}
?>
XxLPxX каза:<?php
class Site{
public $title='dadsdsdasdasd';
function __construct(){
include('includes/layout/head.php');
}
public function Title($this->title){
echo $a;
$a=$this->title;
}
}
?>
Как да направя че стойноста във title( ) да е равна на public $title :?
Така<?php
var title='dadsdsdasdasd';
function __construct(){
include('includes/layout/head.php');
}
public function Title($this->title){
echo $a;
$a=$this->title;
}
}
?>
<?php
require('classes/site.php');
$obj=new Site;
$obj->title('Title');
?>
<?php
class Site{
public $title='asdasd';
function __construct(){
include('includes/layout/head.php');
}
public function Title($a){
$a = $this->title;
}
}
?>
<?php
echo'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>'.$this->title.'</title>
</head>';
?>
<?php
class Site{
public $title='dadsdsdasdasd';
function __construct(){
include('includes/layout/head.php');
}
public function Title($a){
$this->title = $a;
echo $a;
}
}
$obj=new Site;
echo $obj->title;
$obj->title('Title');
?>
<html>
<title><?php $obj->title('Title'); ?></title>
<body>
</body>
</html>