本文整理汇总了PHP中Sample::helloWorld方法的典型用法代码示例。如果您正苦于以下问题:PHP Sample::helloWorld方法的具体用法?PHP Sample::helloWorld怎么用?PHP Sample::helloWorld使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sample
的用法示例。
在下文中一共展示了Sample::helloWorld方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Sample
#logo {
width: 268px;
height: 55px;
}
</style>
</head>
<body>
<div id="container">
<img src="reinvent.png" id="logo" alt="AWS re:Invent">
<h1>Application Lifecycle Management Bootcamp</h1>
<p>
<?php
require_once 'src/Sample.php';
$obj = new Sample();
echo $obj->helloWorld();
?>
</p>
<?php
$instance_id = file_get_contents("http://169.254.169.254/latest/meta-data/instance-id");
$local_ipv4 = file_get_contents("http://169.254.169.254/latest/meta-data/local-ipv4");
$instance_type = file_get_contents("http://169.254.169.254/latest/meta-data/instance-type");
$article = "a";
switch (substr($instance_type, 0, 1)) {
case "m":
case "r":
case "i":
case "h":
$article = "an";
break;
}
示例2: testHelloWorld
public function testHelloWorld()
{
$obj = new Sample();
$this->assertTrue($obj->helloWorld() == "Hello! Je m'eclate encore plus...");
}
示例3: testHelloWorld
public function testHelloWorld()
{
$obj = new Sample();
$this->assertTrue($obj->helloWorld() == "Hello World. AWS CodePipeline and Continuous Deployment is so much fun!");
}
示例4: aaa
/**
* @test
*/
public function aaa()
{
$Sample = new Sample();
$this->assertEquals($Sample->helloWorld(), 'hello world!');
}