我打电话给http://data.alexa.com/data?cli=10&dat=snbamz&url=www.flipkart.com获取网站数据,当我在浏览器上运行时,它会显示这个XML.
<ALEXA VER="0.9" URL="flipkart.com/" HOME="0" AID="=" IDN="flipkart.com/">
<RLS PREFIX="http://" more="0">
<RL HREF="storewala.com/" TITLE="Storewala.com - Indian Retail Store"/>
<RL HREF="pdf-search-engine.com/" TITLE="Ebook Search - Pdf Search Engine"/>
<RL HREF="overnitenet.com/" TITLE="-----Overnite-----"/>
<RL HREF="nbcindia.com/" TITLE="Online Book Stores, India's Largest Bookstore, Nbc India.com"/>
<RL HREF="mouthshut.com/" TITLE="Mouthshut.com - Consumer Reviews Helping You Decide"/>
<RL HREF="landmarkonthenet.com/" TITLE="Land Mark"/>
<RL HREF="ingrambook.com/" TITLE="Ingram Book Group"/>
<RL HREF="infibeam.com/" TITLE="InfiBeam - Gifts to India | Online Shopping India | Books, Cameras, Watches, Mob"/>
<RL HREF="indiaplaza.in/" TITLE="Fabmall House"/>
<RL HREF="firstflight.net/" …Run Code Online (Sandbox Code Playgroud) 我在传递值时遇到一个问题,我无法通过查询字符串传递它.我的PHP是:
<div class="menu">
<div class="sub_menu_header">ABOUT</div>
<?php
$query1="SELECT id,title FROM aboutus_tbl";
$resulto=mysql_query($query1);
while ($row = mysql_fetch_array($resulto)) {
?>
<a href="about" class="menuid" id="<?php echo $row['id'];?>"><div class="<?php echo $row['title'];?>" id="sub_menu"><?php echo $row['title'];?>
</div></a>
<?php
}
?>
</div>
Run Code Online (Sandbox Code Playgroud)
jQuery的:
<script>
$(".menuid").click(function() {
date_time = $(this).attr('id');
console.log(data);
$.ajax({
type: 'POST',
url: 'about',
data: {"aboutus_id" : date_time},
success: function(data){
alert( data );
}
});
});
</script>
Run Code Online (Sandbox Code Playgroud)
完整代码:
<?php ob_start(); include('web/header.php');?>
<!--main-->
<div class="main_btm">
<div class="wrap">
<div class="main">
<div class="new_head"><font size="5" color="#FC2B5F">
<script>
$(".menuid").click(function() {
date_time = …Run Code Online (Sandbox Code Playgroud) 在我的项目中,typeahead.js给出了错误:
未捕获的TypeError:$(...).typeahead不是函数
PHP
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="public/js/typeahead.js"></script>
<script>
jQuery(document).ready(function() {
var offset = 250;
var duration = 300;
jQuery(window).scroll(function() {
if (jQuery(this).scrollTop() > offset) {
jQuery('.back-to-top').fadeIn(duration);
} else {
jQuery('.back-to-top').fadeOut(duration);
}
});
jQuery('.back-to-top').click(function(event) {
event.preventDefault();
jQuery('html, body').animate({scrollTop: 0}, duration);
return false;
});
$('input.search').typeahead({
name: 'companyName',
remote:'ser_sug.php?key=%QUERY',
limit : 10
});
});
</script>
<style type="text/css">
.bs-example{
font-family: sans-serif;
position: relative;
margin: 50px;
}
.typeahead, .tt-query, .tt-hint {
border: 2px solid #CCCCCC;
border-radius: 8px;
font-size: 24px;
height: 30px;
line-height: 30px; …Run Code Online (Sandbox Code Playgroud) 在我的项目中我只是做图像水印或图像结合它的工作正常和代码.
<!DOCTYPE html>
<html>
<head>
<title>test</title>
</head>
<body>
<?php
if(isset($_POST['submit']))
{
// Give the Complete Path of the folder where you want to save the image
$folder="uploads/";
move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], "$folder".$_FILES["fileToUpload"]["name"]);
$file='uploads/'.$_FILES["fileToUpload"]["name"];
$uploadimage=$folder.$_FILES["fileToUpload"]["name"];
$newname= time();
$ext = pathinfo($_FILES["fileToUpload"]["name"], PATHINFO_EXTENSION);
// Set the thumbnail name
$thumbnail = $folder.$newname.".".$ext;
$imgname=$newname.".".$ext;
// Load the mian image
if ($ext=="png" || $ext=="PNG") {
$source = imagecreatefrompng($uploadimage);
}
else if ($ext=="gif" || $ext=="GIF") {
$source = imagecreatefromgif($uploadimage);
}
else if ($ext=="bmp" || $ext=="BMP") {
$source = imagecreatefrombmp($uploadimage);
} …Run Code Online (Sandbox Code Playgroud) 我使用输入类型='文件'与多个文件和一个单个文件.喜欢,
//single image
//IMAGE_TYPES is constant and defined with:define('IMAGE_TYPES',array('main','floor','bedroom1','bedroom2','bedroom3','kitchen','reception','garages','epc','other'));
@foreach(IMAGE_TYPES as $images)
@if($images!='other')
<div class="col-sm-10">
<input type="file" class="form-control" id="{{$images}}_image" name="{{$images}}_image" accept="image/*" placeholder="<span> <i class='fa fa-plus-circle'></i>Click here or drop files to upload</span>"/>
</div>
@else
//multiple
<div class="col-sm-10">
<input type="file" class="form-control" id="other_images" name="other_images[]" accept="image/*" placeholder="<span> <i class='fa fa-plus-circle'></i>Click here or drop files to upload</span>" multiple />
</div>
@endif
@endforeach
Run Code Online (Sandbox Code Playgroud)
现在,我用jquery验证它,
var image_type ='<?=json_encode(IMAGE_TYPES);?>';
image_type = JSON.parse(image_type);
var max_image_size = 2;
$.each(image_type, function( index, value ) {
if (value!='other') {
$('#'+value+'_image').bind('change', function() { …Run Code Online (Sandbox Code Playgroud) 在我的项目中,我在数据库中进行了很多更改,有时我需要将命令重新分配给数据库中的某个表.所以,我想要的是.我有下表.
id name address order
1 vijay mumbai 2
3 ram delhi 4
4 ravi pune 5
5 rutul surat 8
9 vipul agra 11
Run Code Online (Sandbox Code Playgroud)
我想从mysql查询更新它...就像
id name address order
1 vijay mumbai 0
3 ram delhi 1
4 ravi pune 2
5 rutul surat 3
9 vipul agra 4
Run Code Online (Sandbox Code Playgroud)
所以我想要的是我的订单字段从0更新到加一个等等......如何做到这一点我不知道......我尝试但我也没有接近解决方案.怎么做?请帮我.
我正在制作一个响应式网站并为此使用媒体查询,但是,我遇到了一个问题,即我给出了内联样式。现在我想针对不同尺寸的屏幕更改该样式。怎样才能做到呢?这是我的代码。
<table class="edu_table" style="width:500px;margin-right:400px;margin-bottom:30px;">
Run Code Online (Sandbox Code Playgroud)
在样式中我给出了 width=500px; 我想要它 700px
@media only screen and (max-width: 1920px) {
}
Run Code Online (Sandbox Code Playgroud)
1920px 大小的屏幕。请给出解决方案或提供其他方法来完成此操作。我在很多地方使用 edu_table 类...并且我想要 width=700px; 适用于屏幕尺寸 1920px 和特定位置。
我从PHPExcel-1.8中的33chartcreate-pie.php中取了示例并根据我的需要进行更改.现在该示例具有x轴值.
$xAxisTickValues1 = array(
new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4
);
Run Code Online (Sandbox Code Playgroud)
现在,我想将它静态添加为PASS和FAIL所以,我试试它
$xAxisTickValues1 = array(
new PHPExcel_Chart_DataSeriesValues('String', 'PASS:FAIL', NULL, 2), // Q1 to Q4
);
Run Code Online (Sandbox Code Playgroud)
但是,它不起作用.如何在该数组中放置静态值?
在我的页面中,我有这个带有echo的代码.
<?php
include("../config.php");
$q = mysql_query("SELECT propertyaddress FROM propertydetail WHERE active='yes' and leasedatefrom='".date("m-d-Y", strtotime('+1 months'))."'");
$res = mysql_fetch_array($q);
echo "<br/>pdetail=".$pdetail=trim($res['propertyaddress']);
echo $query="SELECT * FROM tenantmaster WHERE propertyaddress like '".$pdetail."'";
//echo $query="SELECT * FROM tenantmaster ";
//echo $query="SELECT * FROM tenantmaster WHERE propertyaddress = '1934 Heron Ave Unit D Schaumburg IL 60193'";
$resultdb = mysql_query($query);
if (!$resultdb) {
die('Invalid query: ' . mysql_error());
}
else{
echo "<br/>right query";
}
echo "<br/>num of row===".mysql_num_rows($resultdb);
$rowt = mysql_fetch_array($resultdb);
echo "<br/>row===".$rowt['name'];
exit;
?>
Run Code Online (Sandbox Code Playgroud)
config.php文件 …
在我的项目中我有菜单和较小的屏幕我使用下拉菜单.这是html代码.
<select>
<option value="index.php" id="home">Home</option>
<option value="about?aboutus=aboutus" id="about">About Us</option>
<option value="courses?cosoff=cosoff" id="courses">Courses Offered</option>
<option value="admission?admi=admi" id="admission">Admission</option>
<option value="facelities?face=face" id="facelities">Facelities</option>
<option value="events?eve=eve" id="events">Events</option>
<option value="career.php?car=car" id="career">Career</option>
<option value="contact.php?con=con" id="contact">Contact</option>
</select>
Run Code Online (Sandbox Code Playgroud)
我使用jquery选择菜单并保持选中状态.它是
<script type="text/javascript">
window.onload = function() {
$(document).ready(function() {
$("#about").children("option").is("selected").text()
});
}
</script>
Run Code Online (Sandbox Code Playgroud)
这只是对于id = about,就像我已经放入jquery的每个id一样,但是它不能用于设置selected的选项值.第二个问题是id = home默认选择然后我转到ex.id = about然后我再去id = home它不会重定向到index.php
在我的表单标签中,我有两个名为SIGNIN和SIGNUP的按钮,如果按下SIGNIN按钮,表单应该提交.如果按下SIGNUP按钮,它应重定向到下面的锚标记中给出的URL,但它总是提交表单.请帮我.
<form action="controllers/user/vauth.php" method="post" role="form" class="userLogin" style="padding:20px;">
<div class='alert alert-danger' id='errorLabel' style="display:none;"></div>
<?php
if(isset($_SESSION['error'])) {
echo "<div class='alert alert-danger' id='errorLabel'>";
foreach($_SESSION['error'] as $error) echo "<p><b>".$error."</b></p>";
echo "</div>";
unset($_SESSION['error']);
}
if(isset($_SESSION['message'])) {
echo "<div class='alert alert-success'>".$_SESSION['message']."</div>";
unset($_SESSION['message']);
}
?>
<div class="form-group">
<label for="email">Email</label>
<input type="text" name="vemail" id="vemail" class="form-control" placeholder="Enter Email" value="<?php if(isset($_SESSION['values'])) echo $_SESSION['values']['email']; ?>">
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" name="vpassword" id="vpassword" class="form-control" placeholder="Enter Password">
</div>
<div class="form-group">
<a href="user/vfpass.php">Forgot Password ?</a>
</div>
<button type="submit" class="btn btn-default" name="vsubmit">LOG IN</button><a …Run Code Online (Sandbox Code Playgroud) 我有这个HTML代码.
<form class="" role="form">
<div class="col-lg-2">
<div class="form-group">
<label for="streams">Select Stream</label>
<select name="streams" id="streams" class="form-control">
<option value="">-- Select --</option>
<?php
while($streamRow = mysql_fetch_array($streamResult)) {
echo
"<option value=".$streamRow[0].">".$streamRow[1]."</option>";
}
?>
</select>
</div>
</div>
<div class="col-lg-2">
<div class="form-group">
<label for="branches">Select Branch</label>
<select name="branches" id="branches" class="form-control">
<option value="">-- Select --</option>
</select>
</div>
</div>
<div class="col-lg-2">
<div class="form-group">
<label for="batches">Select Batch</label>
<select name="batches" id="batches" class="form-control">
<option value="">-- Select --</option>
</select>
</div>
</div>
<div class="col-lg-2">
<div class="form-group divBefore">
<label for="divisionBefore">Div</label>
<select name="divisionBefore" id="divisionBefore" class="form-control">
<option …Run Code Online (Sandbox Code Playgroud) 在MYSQL数据库中,我使用了phone.no列,它的数据类型为int.我把它从int(13)带到int(30),但它的最大值是2147483647.
我希望最大值为9999999999.