请问下面这段登陆后台代码怎么改成免登陆
请问下面这段登陆后台代码怎么改成免登陆,就是打开这个文件就直接登陆,不用输入管理员帐号密码
- PHP code
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --><?php define('SUB_DIR','/services'); session_start(); error_reporting(E_ALL ^ E_NOTICE); if(!isset($_SESSION['adm_name']) || empty($_SESSION['adm_name'])) exit; //2011-01-30 update $actions = array('clear','getuser','updategoods','updatesite'); if(isset($_REQUEST['action'])) { $action = strtolower($_REQUEST['action']); if(!in_array($action,$actions)) exit; } else exit; set_time_limit(3600); if(function_exists('ini_set')) ini_set('max_execution_time',3600); require '../core/service/fanwe.service.php'; if($action == 'clear') { $fanwe = &FanweService::instance(); //2011-01-30 update $fanwe->is_admin = true; $fanwe->is_session = false; $fanwe->is_user = false; $fanwe->is_cron = false; $fanwe->cache_list = array(); $fanwe->initialize(); include_once import('function/cache'); updateCache(); clearDir(FANWE_ROOT.'./public/tpl'); clearDir(FANWE_ROOT.'./admin/Runtime'); clearDir(FANWE_ROOT.'./update/Runtime'); //include FANWE_ROOT.'./ThinkPHP/Vendor/bbs.php'; //BBSAction::getInstance()->updateSetting(); $result = array("status"=>1,"info"=>'清除成功',"data"=>""); include import('class/json'); $json = new JSON(); die($json->encode($result)); } //2011-01-30 update elseif($action == 'updategoods') { $fanwe = &FanweService::instance(); $fanwe->is_admin = true; $fanwe->is_session = false; $fanwe->is_user = false; $fanwe->is_cron = false; $fanwe->cache_list = array('goods'); $fanwe->initialize(); set_time_limit(0); global $_FANWE; $begin = isset($_FANWE['request']['begin']) ? intval($_FANWE['request']['begin']) : 0; $begin = max($begin,0); if($begin == 0) { DB::query("DELETE FROM ".DB::table('cron')." WHERE type='goods'"); DB::query("TRUNCATE TABLE ".DB::table('goods_now')); DB::query('REPLACE INTO '.DB::table('goods_now').'(id, site_id, site_name, name, city, cate_id, url, click_count, best_count, collect_count, shop_price, market_price, begin_time, end_time, brief, sort, small_img, big_img, score, is_best, bought, collect_buy, ef_time, post_count, r_sort, cr_sort, add_time) SELECT g.id, g.site_id, site_name, name, g.city, g.cate_id, url, click_count, best_count, collect_count, shop_price, market_price, begin_time, g.end_time, brief, g.sort, small_img, big_img, score, is_best, bought, collect_buy, ef_time, post_count, g.r_sort, g.cr_sort, add_time FROM '.DB::table ('goods_key').' AS gk INNER JOIN '.DB::table('goods').' AS g ON g.id = gk.id WHERE g.status = 1 AND gk.end_time > '.TIME_UTC); DB::query("TRUNCATE TABLE ".DB::table('goods_now_key')); DB::query('REPLACE INTO '.DB::table('goods_now_key').' SELECT id,site_id,city,cate_id,sort,r_sort,cr_sort,0,0,0,0,end_time FROM '.DB::table ('goods_now')); DB::query('DELETE FROM '.DB::table('goods_now_match').' WHERE id NOT IN (SELECT id FROM '.DB::table('goods_now_key').')'); DB::query('INSERT INTO '.DB::table('goods_now_match').' SELECT gm.id,gm.content FROM '.DB::table('goods_key').' AS gk INNER JOIN '.DB::table('goods_match').' AS gm ON gm.id = gk.id LEFT JOIN '.DB::table('goods_now_match').' AS gnm ON gnm.id = gk.id WHERE gk.end_time > '.TIME_UTC.' AND gnm.id IS NULL'); $begin = 0; } $sort_sites = array(); $res = DB::query('SELECT site_id FROM '.DB::table('goods_key').' WHERE end_time > '.getTodayTime().' GROUP BY site_id'); while($sid = DB::fetch($res)) { $sort_sites[] = $sid['site_id']; } $data_num = count($sort_sites); echo "<script type='\"text/javascript\"'>document.write('数据表 goods_now 共 ".$data_num." 个站点<br/>');</script>"."\r\n"; flush(); ob_flush(); if($data_num > $begin) { $site_id = $sort_sites[$begin]; echo "<script type='\"text/javascript\"'>document.write('开始更新数据表 goods_now 站点 ".($begin + 1)."<br/>');</script>"."\r\n"; flush(); ob_flush(); DB::query('TRUNCATE TABLE '.DB::table('goods_temp')); DB::query('REPLACE INTO '.DB::table('goods_temp').' SELECT id, site_id, city, cate_id, sort, @sort:=@sort + 1 as r_sort,0,0,0,0,0,end_time FROM '.DB::table('goods_now_key').' FORCE INDEX (site),(SELECT @sort:=0) AS t WHERE site_id = '.$site_id.' ORDER BY sort ASC,id DESC'); if(DB::affectedRows() > 0) { $goods_cate_citys = array(); $goods_cates = array(); $goods_citys = array(); $sql = ''; $sql_jg = ''; $res = DB::query('SELECT * FROM '.DB::table('goods_temp').' ORDER BY sort ASC,id DESC'); while($goods = DB::fetch($res)) { $cr_sort = 0; $d_sort = 0; $dc_sort = 0; $e_sort = 0; $ec_sort = 0; $city = $goods['city']; if(!isset($goods_citys[$city])) $goods_citys[$city] = 0; $goods_citys[$city]++; $cr_sort = $goods_citys[$city]; $cate_id = $goods['cate_id']; $cate = $_FANWE['cache']['goods']['cats'][$cate_id]; if(!isset($goods_cates[$cate_id])) $goods_cates[$cate_id] = 0; $goods_cates[$cate_id]++; if(!isset($goods_cate_citys[$cate_id][$city])) $goods_cate_citys[$cate_id][$city] = 0; $goods_cate_citys[$cate_id][$city]++; $parent_id = $cate['pid']; if($parent_id > 0) { $e_sort = $goods_cates[$cate_id]; $ec_sort = $goods_cate_citys[$cate_id][$city]; if(!isset($goods_cates[$parent_id])) $goods_cates[$parent_id] = 0; $goods_cates[$parent_id]++; $d_sort = $goods_cates[$parent_id]; if(!isset($goods_cate_citys[$parent_id][$city])) $goods_cate_citys[$parent_id][$city] = 0; $goods_cate_citys[$parent_id][$city]++; $dc_sort = $goods_cate_citys[$parent_id][$city]; } else { $d_sort = $goods_cates[$cate_id]; $dc_sort = $goods_cate_citys[$cate_id][$city]; } $sql .= "$sql_jg($goods[id],$goods[site_id], '$city', $cate_id, $goods[sort], $goods[r_sort], $cr_sort, $d_sort, $dc_sort, $e_sort, $ec_sort, $goods[end_time])"; $sql_jg = ','; } if($sql != '') { DB::query('REPLACE INTO '.DB::table('goods_temp').' VALUES '.$sql); DB::query('REPLACE INTO '.DB::table('goods_now_key').' SELECT * FROM '.DB::table('goods_temp')); } } usleep(10); DB::query('TRUNCATE TABLE '.DB::table('goods_temp')); DB::query('REPLACE INTO '.DB::table('goods_temp').' SELECT id, site_id, city, cate_id, sort, @sort:=@sort + 1 as r_sort,0,0,0,0,0,end_time FROM '.DB::table('goods_key').' FORCE INDEX (site),(SELECT @sort:=0) AS t WHERE site_id = '.$site_id.' AND end_time > '.getTodayTime().' ORDER BY sort ASC,id DESC'); if(DB::affectedRows() > 0) { $goods_cate_citys = array(); $goods_cates = array(); $goods_citys = array(); $sql = ''; $sql_jg = ''; $res = DB::query('SELECT * FROM '.DB::table('goods_temp').' ORDER BY sort ASC,id DESC'); while($goods = DB::fetch($res)) { $cr_sort = 0; $d_sort = 0; $dc_sort = 0; $e_sort = 0; $ec_sort = 0; $city = $goods['city']; if(!isset($goods_citys[$city])) $goods_citys[$city] = 0; $goods_citys[$city]++; $cr_sort = $goods_citys[$city]; $cate_id = $goods['cate_id']; $cate = $_FANWE['cache']['goods']['cats'][$cate_id]; if(!isset($goods_cates[$cate_id])) $goods_cates[$cate_id] = 0; $goods_cates[$cate_id]++; if(!isset($goods_cate_citys[$cate_id][$city])) $goods_cate_citys[$cate_id][$city] = 0; $goods_cate_citys[$cate_id][$city]++; $parent_id = $cate['pid']; if($parent_id > 0) { $e_sort = $goods_cates[$cate_id]; $ec_sort = $goods_cate_citys[$cate_id][$city]; if(!isset($goods_cates[$parent_id])) $goods_cates[$parent_id] = 0; $goods_cates[$parent_id]++; $d_sort = $goods_cates[$parent_id]; if(!isset($goods_cate_citys[$parent_id][$city])) $goods_cate_citys[$parent_id][$city] = 0; $goods_cate_citys[$parent_id][$city]++; $dc_sort = $goods_cate_citys[$parent_id][$city]; } <div class="clear"> </div>

PHP는 현대적인 프로그래밍, 특히 웹 개발 분야에서 강력하고 널리 사용되는 도구로 남아 있습니다. 1) PHP는 사용하기 쉽고 데이터베이스와 완벽하게 통합되며 많은 개발자에게 가장 먼저 선택됩니다. 2) 동적 컨텐츠 생성 및 객체 지향 프로그래밍을 지원하여 웹 사이트를 신속하게 작성하고 유지 관리하는 데 적합합니다. 3) 데이터베이스 쿼리를 캐싱하고 최적화함으로써 PHP의 성능을 향상시킬 수 있으며, 광범위한 커뮤니티와 풍부한 생태계는 오늘날의 기술 스택에 여전히 중요합니다.

PHP에서는 약한 참조가 약한 회의 클래스를 통해 구현되며 쓰레기 수집가가 물체를 되 찾는 것을 방해하지 않습니다. 약한 참조는 캐싱 시스템 및 이벤트 리스너와 같은 시나리오에 적합합니다. 물체의 생존을 보장 할 수 없으며 쓰레기 수집이 지연 될 수 있음에 주목해야합니다.

\ _ \ _ 호출 메소드를 사용하면 객체를 함수처럼 호출 할 수 있습니다. 1. 객체를 호출 할 수 있도록 메소드를 호출하는 \ _ \ _ 정의하십시오. 2. $ obj (...) 구문을 사용할 때 PHP는 \ _ \ _ invoke 메소드를 실행합니다. 3. 로깅 및 계산기, 코드 유연성 및 가독성 향상과 같은 시나리오에 적합합니다.

섬유는 PHP8.1에 도입되어 동시 처리 기능을 향상시켰다. 1) 섬유는 코 루틴과 유사한 가벼운 동시성 모델입니다. 2) 개발자는 작업의 실행 흐름을 수동으로 제어 할 수 있으며 I/O 집약적 작업을 처리하는 데 적합합니다. 3) 섬유를 사용하면보다 효율적이고 반응이 좋은 코드를 작성할 수 있습니다.

PHP 커뮤니티는 개발자 성장을 돕기 위해 풍부한 자원과 지원을 제공합니다. 1) 자료에는 공식 문서, 튜토리얼, 블로그 및 Laravel 및 Symfony와 같은 오픈 소스 프로젝트가 포함됩니다. 2) 지원은 StackoverFlow, Reddit 및 Slack 채널을 통해 얻을 수 있습니다. 3) RFC에 따라 개발 동향을 배울 수 있습니다. 4) 적극적인 참여, 코드에 대한 기여 및 학습 공유를 통해 커뮤니티에 통합 될 수 있습니다.

PHP와 Python은 각각 고유 한 장점이 있으며 선택은 프로젝트 요구 사항을 기반으로해야합니다. 1.PHP는 간단한 구문과 높은 실행 효율로 웹 개발에 적합합니다. 2. Python은 간결한 구문 및 풍부한 라이브러리를 갖춘 데이터 과학 및 기계 학습에 적합합니다.

PHP는 죽지 않고 끊임없이 적응하고 진화합니다. 1) PHP는 1994 년부터 새로운 기술 트렌드에 적응하기 위해 여러 버전 반복을 겪었습니다. 2) 현재 전자 상거래, 컨텐츠 관리 시스템 및 기타 분야에서 널리 사용됩니다. 3) PHP8은 성능과 현대화를 개선하기 위해 JIT 컴파일러 및 기타 기능을 소개합니다. 4) Opcache를 사용하고 PSR-12 표준을 따라 성능 및 코드 품질을 최적화하십시오.

PHP의 미래는 새로운 기술 트렌드에 적응하고 혁신적인 기능을 도입함으로써 달성 될 것입니다. 1) 클라우드 컴퓨팅, 컨테이너화 및 마이크로 서비스 아키텍처에 적응, Docker 및 Kubernetes 지원; 2) 성능 및 데이터 처리 효율을 향상시키기 위해 JIT 컴파일러 및 열거 유형을 도입합니다. 3) 지속적으로 성능을 최적화하고 모범 사례를 홍보합니다.


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

SecList
SecLists는 최고의 보안 테스터의 동반자입니다. 보안 평가 시 자주 사용되는 다양한 유형의 목록을 한 곳에 모아 놓은 것입니다. SecLists는 보안 테스터에게 필요할 수 있는 모든 목록을 편리하게 제공하여 보안 테스트를 더욱 효율적이고 생산적으로 만드는 데 도움이 됩니다. 목록 유형에는 사용자 이름, 비밀번호, URL, 퍼징 페이로드, 민감한 데이터 패턴, 웹 셸 등이 포함됩니다. 테스터는 이 저장소를 새로운 테스트 시스템으로 간단히 가져올 수 있으며 필요한 모든 유형의 목록에 액세스할 수 있습니다.

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

에디트플러스 중국어 크랙 버전
작은 크기, 구문 강조, 코드 프롬프트 기능을 지원하지 않음

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

VSCode Windows 64비트 다운로드
Microsoft에서 출시한 강력한 무료 IDE 편집기
