好!欢迎访问迷津渡口 现在时间是: 天气 °C ~ °C

迷津渡口

越感到迷惑 越接近真理

emlog MVC解构1--install.php

emlog5.3.1的初始文件结构:

src
├── admin
├── config.php
├── content
├── include
├── index.php
├── init.php
├── install.php
├── m
├── robots.txt
├── rss.php
├── t
├── wlwmanifest.xml
└── xmlrpc.php

安装之前,emlog的调用路径为:

入口文件index.php->调用init.php->调用原始的config.php,里面有:

header("location: ./install.php");exit;

跳转到install.php,开始安装进程。


安装进程完全由install.php控制,install.php控制主要通过变量$act。

开始时$act为空字符串,因此install.php输出表单提供用户输入,主要是数据库地址,数据库用户名,数据库密码,数据库名,数据库表前缀,管理员登录名,登录密码。


提交表单后$act变为'install',install.php首先判断提交的数据是否正确,不正确提示回到上一步,正确则尝试判断数据库里是否已经有设置的前缀的表了,若有提示是否覆盖安装。如果没有进入配置阶段。


首先重写config.php,删除跳转,仅保留配置数据,包括数据库常量和其他一些必要的常量。

然后重新加密用户密码。

配置数据库编码:

DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

然后数据库建表和写入基本数据,数据库分析看下篇。

数据库基本信息创建完成后,重建缓存后输出一些必要的提示。

自动删除install.php,未成功则提醒手动删除,去除一些安全隐患。

点赞3
 标签: emlog mvc install.php
   支持一下
挤眼 亲亲 咆哮 开心 想想 可怜 糗大了 委屈 哈哈 小声点 右哼哼 左哼哼 疑问 坏笑 赚钱啦 悲伤 耍酷 勾引 厉害 握手 耶 嘻嘻 害羞 鼓掌 馋嘴 抓狂 抱抱 围观 威武 给力
 点赞
 签到
 表情
 图片
 代码
提交评论

清空信息
关闭评论
poppiesdelray
 poppiesdelray 约 1 小时前回复
#118
<a href="http://www.rcrocs.com/adidas-d-rose-7-gris-zapatosk">adidas d rose 7 gris</a> <a href="http://www.moreheaddotts.com/nike-hyperdunk-navy-blue-shoesj">nike hyperdunk navy blue</a> <a href="http://www.qgchsmrt.com/new-england-patriots-new-era-2018-nfl-kids-training-39thirty-cap-hath">new england patriots new era 2018 nfl kids training 39thirty cap</a> <a href="http://www.firagandia.com/hombres-nike-air-max-2011-blanco-light-azul-zapatosl">hombres nike air max 2011 blanco light azul</a> <a href="http://www.lmladeco.com/nike-air-max-1-white-shoesk">nike air max 1 white</a> <a href="http://www.brinkmanmdc.com/nike-air-max-90-bl%C3%A5-and-gull-obuvi">nike air max 90 bl氓 and gull</a>
poppiesdelray http://www.poppiesdelray.com/
visasdecanada
 visasdecanada 约 5 小时前回复
#117
<a href="http://www.hitsturbines.com/orange-blue-mens-adidas-ace-soccer-shoes-sneakerd">orange blue mens adidas ace soccer shoes</a> <a href="http://www.jadamsrealtor.com/billig-adidas-tubular-shadow-kvinners-gr%C3%A5-shoesf">billig adidas tubular shadow kvinners gr氓</a> <a href="http://www.rfsloan.com/ray-ban-rb3016-clubmaster-sunglasses-mock-tortoise-arista-frame-sunglassesr">ray ban rb3016 clubmaster sunglasses mock tortoise arista frame</a>
visasdecanada http://www.visasdecanada.com/
strongtale
 strongtale 2019-03-20 14:00回复
#116
<a href="http://www.mistopup.com/light-grey-gazelle-adidas-shoesk">light grey gazelle adidas</a> <a href="http://www.sporbahispro.com/cheap-oakley-dispatch-2-sunglasses-sunglassesh">cheap oakley dispatch 2 sunglasses</a> <a href="http://www.kalrakis.com/nike-roshe-run-blanc-chaussuresl">nike roshe run blanc</a> <a href="http://www.xinyudaili.com/blanc-on-blanc-nike-roshe-chaussuresl">blanc on blanc nike roshe</a> <a href="http://www.marieluwasche.com/converse-chuck-taylor-alle-star-leder-wei%C3%9F-schuhej">converse chuck taylor alle star leder wei脽</a> <a href="http://www.ferrepress.com/nike-air-max-90-wei%C3%9F-grau-gr%C3%BCn-schuhei">nike air max 90 wei脽 grau gr眉n</a>
strongtale http://www.strongtale.com/
femmedeguinee
 femmedeguinee 2019-03-19 15:47回复
#115
<a href="http://www.polurnetsucks.com/maschio-new-balance-595-verde-schuheg">maschio new balance 595 verde</a> <a href="http://www.taskanizerapp.com/air-jordan-retro-5-sort-and-bl%C3%A5-schuheb">air jordan retro 5 sort and bl氓</a> <a href="http://www.balloonpunkt.com/herren-nike-air-max-2015-premium-chaussurese">herren nike air max 2015 premium</a> <a href="http://www.biereaveyron.com/nike-free-run-4.0-v3-grau-turquoise-x2-butyg">nike free run 4.0 v3 grau turquoise x2</a> <a href="http://www.churchatsea.com/nike-air-max-zero-rot-stardust-filter-scarpea">nike air max zero rot stardust filter</a> <a href="http://www.esmokecanada.com/jordan-retro-11-bianca-and-oro-schuheb">jordan retro 11 bianca and oro</a>
femmedeguinee http://www.femmedeguinee.com/
syntheticfish
 syntheticfish 2019-03-19 01:48回复
#114
<a href="http://www.czappmasonry.com/jordan-gamma-bleu-ebay-kurpesa">jordan gamma bleu ebay</a> <a href="http://www.hiussalipiilo.com/vibram-fivefingers-sprint-gr%C3%A5-svart-butyg">vibram fivefingers sprint gr氓 svart</a> <a href="http://www.olgroupusainc.com/nike-womens-frostee-rucker-limited-olivecamo-jersey-oakland-raiders-nfl-98-2017-salute-to-service-nflx">nike womens frostee rucker limited olivecamo jersey oakland raiders nfl 98 2017 salute to service</a> <a href="http://www.shahsmkj.com/air-jordan-retro-18-blanc-jaune-butyd">air jordan retro 18 blanc jaune</a> <a href="http://www.theuntamedco.com/air-jordan-13-retro-gs-hyper-rosado-quilt-kurpesc">air jordan 13 retro gs hyper rosado quilt</a> <a href="http://www.wsendeavors.com/ralph-lauren-polo-gr%C3%A5-sweatpants-with-cuffed-bottom-in-menn-polos">ralph lauren polo gr氓 sweatpants with cuffed bottom in menn</a>
syntheticfish http://www.syntheticfish.com/
mintyschoice
 mintyschoice 2019-03-18 08:13回复
#113
<a href="http://www.sugarforspice.com/russell-westbrook-jersey-large-nfli">russell westbrook jersey large</a> <a href="http://www.mybancorphsa.com/nike-air-griffey-max-1-varsity-royal-bl%C3%A5-volt-skoq">nike air griffey max 1 varsity royal bl氓 volt</a> <a href="http://www.scopatore.com/mens-white-ralph-lauren-shirt-poloh">mens white ralph lauren shirt</a> <a href="http://www.galacticlogos.com/adidas-yeezy-boost-350-sky-blue-shoesi">adidas yeezy boost 350 sky blue</a> <a href="http://www.ispardmore.com/nike-lunarglide-7-womens-pink-grey-shoesk">nike lunarglide 7 womens pink grey</a> <a href="http://www.radioramabc.com/adidas-neo-lazy-r%C3%B8d-oransje-obuvq">adidas neo lazy r酶d oransje</a>
[url=http://www.mintyschoice.com/]mintyschoice[/url]
thedamnsels
 thedamnsels 2019-03-18 03:47回复
#112
<a href="http://www.mahalodoc.com/adidas-neo-canvas-hvid-r%C3%B8d-chaussuresg">adidas neo canvas hvid r酶d</a> <a href="http://www.truenthusiast.com/air-jordan-17-hvid-bl%C3%A5-zones-kurpesf">air jordan 17 hvid bl氓 zones</a> <a href="http://www.wikigow.com/adidas-ultra-boost-uncaged-blanco-kitchen-obuva">adidas ultra boost uncaged blanco kitchen</a> <a href="http://www.yogabexhill.com/ralph-lauren-navy-striped-shirt-polox">ralph lauren navy striped shirt</a> <a href="http://www.agedleadz.com/nike-lebron-soldier-9-tout-jaune-schuhed">nike lebron soldier 9 tout jaune</a> <a href="http://www.bordybarn.com/new-mennns-nike-air-max-90-scarpec">new mennns nike air max 90</a>
thedamnsels http://www.thedamnsels.com/
hosbeyinli
 hosbeyinli 2019-03-17 03:48回复
#111
<a href="http://www.coverixx.com/kyrie-2-guld-rings-kurpesa">kyrie 2 guld rings</a> <a href="http://www.eiconstrutora.com/nike-air-max-2016-svart-oransje-paint-kurpesd">nike air max 2016 svart oransje paint</a> <a href="http://www.extradimensie.com/nike-kyrie-2-rot-and-schwarz-quarterback-obuva">nike kyrie 2 rot and schwarz quarterback</a> <a href="http://www.funkwood.com/nike-air-force-1-hi-supreme-deep-burgundy-wei%C3%9F-schuhef">nike air force 1 hi supreme deep burgundy wei脽</a> <a href="http://www.akronconcerts.com/adidas-stan-smith-mid-svart-chaussuresg">adidas stan smith mid svart</a> <a href="http://www.bacononice.com/nike-mercurial-superfly-v-fg-sort-powder-obuvd">nike mercurial superfly v fg sort powder</a>
hosbeyinli http://www.hosbeyinli.com/
cpgjoblist
 cpgjoblist 2019-03-17 02:58回复
#110
<a href="http://www.tahoebathworks.net/nike-zoom-pegasus-32-gr%C3%BCn-orange-obuvd">nike zoom pegasus 32 gr眉n orange</a> <a href="http://www.teknicinfo.net/nike-internationalist-trainers-on-salg-chaussuresa">nike internationalist trainers on salg</a> <a href="http://www.thylaneblondeau.net/adidas-neo-skate-rosado-azul-butya">adidas neo skate rosado azul</a> <a href="http://www.tidewaterusadance.net/blu-and-oro-nike-free-runs-scarpef">blu and oro nike free runs</a> <a href="http://www.torukoryoko.net/asics-gel-quantum-360-medieval-bl%C3%A5-light-butyf">asics gel quantum 360 medieval bl氓 light</a> <a href="http://www.toytraders.net/nike-5.0-gituttio-diamond-butyf">nike 5.0 gituttio diamond</a>
cpgjoblist http://www.cpgjoblist.net/
turisim
 turisim 2019-03-16 10:44回复
#109
<a href="http://www.poppiesdelray.com/air-max-90-kvinner-r%C3%B8d-bl%C3%A5-hvit-obuvk">air max 90 kvinner r酶d bl氓 hvit</a> <a href="http://www.soundsofbuzz.com/nike-kobe-11-bianca-and-nero-scarpei">nike kobe 11 bianca and nero</a> <a href="http://www.hozloli.com/nike-magista-opus-tpu-fg-azul-negro-zapatosh">nike magista opus tpu fg azul negro</a> <a href="http://www.privetaustria.com/nike-free-3.0-flyknit-herre-sort-skok">nike free 3.0 flyknit herre sort</a> <a href="http://www.goodnnasty.com/air-jordan-retro-1-r%C3%B8d-and-svart-obuvi">air jordan retro 1 r酶d and svart</a> <a href="http://www.ankarasanal.com/nike-free-flyknit-3.0-azul-zapatosl">nike free flyknit 3.0 azul</a>
turisim http://www.turisim.com/
顶部留言底部
 00:00/00:00
我想和你虚度时光 - 花房姑娘(9)
  1. 我想和你虚度时光
  2. 花房姑娘
  3. 恋恋风尘
  4. 我喜爱一切不彻底的事物
  5. 我的心里是满的
  6. Long Way
  7. 给少年的歌
  8. 晴日共剪窗
  9. 天上的月你的脸