当前位置: 首页>>代码示例>>PHP>>正文


PHP Student::show方法代码示例

本文整理汇总了PHP中Student::show方法的典型用法代码示例。如果您正苦于以下问题:PHP Student::show方法的具体用法?PHP Student::show怎么用?PHP Student::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Student的用法示例。


在下文中一共展示了Student::show方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

<?php

class Student
{
    private $full_name = '';
    private $score = 0;
    private $grades = array();
    public function __construct($full_name, $score, $grades)
    {
        $this->full_name = $full_name;
        $this->grades = $grades;
        $this->score = $score;
    }
    public function show()
    {
        echo $this->full_name;
    }
    public function __wakeup()
    {
        echo 'Esperando ...';
    }
}
$student = new Student('Frank Sanchez', 'a', array('a' => 90, 'b' => 100));
$student->show();
echo "<br>";
$s = serialize($student);
echo '<br>' . $s . '<br>';
?>

开发者ID:joguer18,项目名称:framePHP,代码行数:28,代码来源:method_magic.php

示例2: Student

<?php

require_once '../init.php';
$student = new Student(new PDOdb("mysql:host=localhost;dbname=usjr", "root", ""));
$results = $student->show('studlname');
?>
<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="UTF-8">
      <meta author="Rabsky">
      <title>
         Student Management - Listing  
      </title>
      <link rel="stylesheet" type="text/css" href="../css/ustyles.css">
   </head>
   <body>
      <header class="mainheader">
         <section class="lefthead">
             <span class="headtext">Rabsky University</span>
         </section>
         <section class="righthead">
         </section>
      </header>   
     <?php 
if ($results) {
    ?>
 	      <table name="studlisting" class="studlist">
 	         <tr>
 	         	<td>ID</td>
 	         	<td>Name</td>
开发者ID:rickyb1970,项目名称:Rabsky,代码行数:31,代码来源:studentList.php

示例3: Student

<?php

require_once "init.php";
//echo "i am here";
$student = new Student(new PDOdb("mysql:host=localhost;dbname=usjr", "root", ""));
$result = $student->show();
if (!$result) {
    echo "No data contained in the result set...";
} else {
    foreach ($result as $res) {
        echo $res['studid'] . ' ' . $res['studfname'] . ' ' . $res['studlname'] . "<br>";
    }
}
// $studid     = 'AA-002';
// $studfname  = 'Jeoffrey';
// $studlname  = 'Gudio';
// $studmname  = 'Camocamo';
// $studcourse = 'BSIT';
// $studyear   = 4;
// $result = $student->insert(array($studid,$studfname,
// 	                        $studlname,$studmname,$studcourse,$studyear));
// if($result > 0)
// 	 echo "Data added";
// else
//      echo "Data was not added";
$result = $student->update(array('studid' => 'AA01', 'studfname' => 'Jeoffrey'), array('studlname' => 'Gudio', 'studcourse' => 'BSCS'), 2);
echo $result;
if ($result > 0) {
    echo "Operation done";
} else {
    echo "Operation failed";
开发者ID:rickyb1970,项目名称:Rabsky,代码行数:31,代码来源:test.php

示例4: __destruct

    }
    public function __destruct()
    {
    }
    public function show()
    {
        parent::show();
        echo "Ocena: " . $this->ocena . "</br>";
    }
}
echo "<h3>Obiekty przed serializacja:</h3>";
$obiekt1 = new Osoba("Jan", "Kowalski", 92112425435);
$obiekt1->show();
echo "</br>";
$obiekt2 = new Student("Grzegorz", "Więckowski", 90042135221, 4.23);
$obiekt2->show();
echo "<h3>Obiekty po serializacji:</h3>";
$obiekt1_serial = serialize($obiekt1);
echo "</br>";
echo $obiekt1_serial;
echo "</br>";
echo "Nie jest mozliwe wywołanie metod obiektow serializowanych.";
echo "</br>";
//$obiekt1_serial->show();
$obiekt2_serial = serialize($obiekt2);
echo "</br>";
echo $obiekt2_serial;
echo "</br>";
echo "Nie jest mozliwe wywołanie metod obiektow serializowanych.";
echo "</br>";
//$obiekt2_serial->show()
开发者ID:jozwikpiotr,项目名称:PI-Projekt-4-PHP2,代码行数:31,代码来源:object.php


注:本文中的Student::show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。