我使用PHPUnit和Selenium Server来测试Yii应用程序,即时通讯使用xp操作系统.我安装PHPUnit_Selenium(1.0.1)和其他软件.实际上我遵循这个bellow指令安装http://www.yiiframework.com/forum/index.php?/topic/14995-wamp-netbeans-phpunit-selenium-警予/
我还下载了selenium-server-standalone-2.20.0.jar文件并通过命令提示我使用java -jar selenium-server-standalone-2.0b3.jar命令启动服务器..
之后我打开了新的命令提示符,我试着测试我简单的hello world yii应用程序.我调用了这个命令phpunit functional/SiteTest.php和ya我也在webtestcase中设置了Test_Base_URL ..
但是在调用上面的命令进行测试之后..一些进程正在进行,2到3次firefox自动打开和关闭,最后我得到了这个错误"@ php_bin @"被识别为内部或外部命令,可操作程序或批处理文件
即使我附上cmd提示的屏幕截图... http://s14.postimage.org/o057x7wox/1cmd.jpg
我开发了简单的angular-firebase应用程序,它提供了基本的CRUD功能.
firebase中的json格式
{
"-J0wuZ_J8P1EO5g4Xfw6" : {
"contact" : "56231545",
"company" : "info",
"city" : "limbdi",
"name" : "priya"
},
"-J0wrhrtgFvIdyMcSL0x" : {
"contact" : "65325422",
"company" : "rilance",
"city" : "jamnagar",
"name" : "pihu"
}
}
Run Code Online (Sandbox Code Playgroud)
用于列出html页面中所有数据的角度代码
<table class='table table-hover'>
<tr>
<th>Name</th>
<th>City</th>
<th>Company</th>
<th>Contact</th>
<th></th>
</tr>
<tr ng-repeat="item in employee">
<td>{{item.name}}</td>
<td>{{item.city}}</td>
<td>{{item.company}}</td>
<td>{{item.contact}}</td>
<td><button class='btn btn-warning btn-mini' ng-click='delemp(employee[$index])'>X</button></td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
当有人点击按钮时,它会触发删除功能,该功能将员工的当前索引作为参数.
var myapp = angular.module('myapp',['firebase']);
myapp.controller('MyCtrl', ['$scope', 'angularFireCollection',
function MyCtrl($scope, angularFireCollection) {
$scope.delemp=function($current_emp){
alert($current_emp.name);
};
}
]);
Run Code Online (Sandbox Code Playgroud)
此警报框包含当前员工的姓名.我想删除当前的员工行.但我不知道如何使用 …
我写下波纹管代码来显示数据库中的图像
<?php
mysql_connect("localhost","root","");
mysql_select_db("test");
$qry = "select id from image";
$res = mysql_query($qry) or die(mysql_error());
while($row = mysql_fetch_array($res))
{
echo "<img src=image.php?id='$row[0]'>";
}
?>
Run Code Online (Sandbox Code Playgroud)
Image.php
<?php
$query = mysql_query("SELECT img FROM images WHERE id = ".$_GET['id']);
$row = mysql_fetch_array($query);
if($type=="pjpeg")
$type="jpeg";
header("Content-type:$type");
echo $row['img'];
?>
Run Code Online (Sandbox Code Playgroud)
但这不行.它显示空白图像图标.