现在我上课了
class test{
var $var_test = 'test';
}
Run Code Online (Sandbox Code Playgroud)
我怎么能得到它
我认为
$t = new test();
echo $t->var_test;
Run Code Online (Sandbox Code Playgroud)
这是真的
好吧假设我有php页面有这个名字name.php?get =并且得到了变量名为get ok我怎么能让它看起来像那个名字?get =
我有这个
"SELECT SUM( state ) FROM `vote` WHERE id ='5'"
Run Code Online (Sandbox Code Playgroud)
现在当在php中添加它时,我该怎么做
$xx= mysql_fetch_array(
mysql_query("SELECT SUM( state ) FROM `vote` WHERE id ='5'")
);
Run Code Online (Sandbox Code Playgroud)
我能这样做吗:
echo $xx['SUM( state )'];
Run Code Online (Sandbox Code Playgroud) array(4) { ["id"]=> int(0) ["pass"]=> string(0) "" ["log_in"]=> string(3) "no" }
Run Code Online (Sandbox Code Playgroud)
id使用isset它时的问题是true因为它返回0.当使用空时我认为它也是这样做的.知道它是否已设定的最佳功能是什么?
我希望jQuery或PHP代码告诉访问者Javascript是否被禁用.怎么做?
现在我做了JavaScript代码(jquery代码),当我点击确定它返回true如果我想要真假如果我想要假
现在问题是php不考虑为真,因为php keyword true它只是把它当作任何其他单词的一个词,我必须这样做
if($post == 'true')
Run Code Online (Sandbox Code Playgroud)
我想让它像这样
if($post) // retuen true if $post true
Run Code Online (Sandbox Code Playgroud)
我怎么能这样做,我使用jquery函数is()向php发送true或false
为什么这段代码不起作用
var name = $("#name").val();
var email = $("#email").val();
var web = $("#web").val();
var comment = $("#comment").val();
if(name.length < 5){
$("#name").css("border-color","red");
} elseif (email.length < 5) {
$("#email").css("border-color","red");
} elseif (web.length < 5) {
$("#web").css("border-color","red");
} elseif (comment.length < 10) {
$("#comment").css("border-color","red");
}else{
alert('ok');
}
Run Code Online (Sandbox Code Playgroud)
和每个像这样的val <input id="name" type="text" size="24" />
我在我的表中有一个字段称为timeINT和iam使用php time()函数现在我想要选择它time今天的所有记录