当前位置: 首页 > news >正文

深圳英文网站建设专业公司seo推广有哪些公司

深圳英文网站建设专业公司,seo推广有哪些公司,备案的域名拿来做别的网站,广州市司法职业学校脚本目的: init 脚本主要的作用是:从 environments 目录中复制配置文件,确保应用适配不同环境(例如开发、生产环境等)。 工作流程: 获取 $_SERVER 的 argv 参数 加载 environments/index.php 文件&#…

脚本目的:

init 脚本主要的作用是:从 environments 目录中复制配置文件,确保应用适配不同环境(例如开发、生产环境等)。

工作流程:

  • 获取 $_SERVERargv 参数

  • 加载 environments/index.php 文件,拿到不同环境配置指定的配置文件关系。

  • 如果执行 init 脚本时提供了 --env 选项,例如:--env=Development 则直接应用此环境,否则会被提示需要选择一个环境来初始化。

  • 获取 environments 对应环境下的所有文件。

  • 因为上一步获取到的所有文件是带有文件全路径的,所以这一步直接复制文件到对应的路径,如:frontend/config/params-local.php

  • environments/index.php 文件中获取到对应环境所配置的需要设置可写、可执行的目录来执行操作。

代码详解:

  • 解析命令行参数:

在这里插入图片描述

  • 检查命令行参数:

在这里插入图片描述

  • 获取 environments 中的文件列表:

在这里插入图片描述

  • 复制文件:
function copyFile($root, $source, $target, &$all, $params)
{// 检查源文件是否存在if (!is_file($root . '/' . $source)) {echo "       skip $target ($source not exist)\n";return true;}// 检查目标文件是否存在if (is_file($root . '/' . $target)) {if (file_get_contents($root . '/' . $source) === file_get_contents($root . '/' . $target)) {echo "  unchanged $target\n";return true;}// 如果$all为true,输出信息并直接进行覆盖。// 否则,提示用户目标文件已存在,并询问是否覆盖(选择“是”、“否”、“全部”或“退出”)。if ($all) {echo "  overwrite $target\n";} else {echo "      exist $target\n";echo "            ...overwrite? [Yes|No|All|Quit] ";// 通过命令行接收用户输入。如果$params['overwrite']不为空,使用该值;否则,等待用户输入。$answer = !empty($params['overwrite']) ? $params['overwrite'] : trim(fgets(STDIN));// 根据用户输入执行相应操作:// 如果输入“q”或“Q”,返回false以退出操作。// 如果输入“y”或“Y”,输出覆盖信息并继续。// 如果输入“a”或“A”,输出覆盖信息并设置$all为true,以便后续文件均自动覆盖。// 其他输入则跳过目标文件。if (!strncasecmp($answer, 'q', 1)) {return false;} else {if (!strncasecmp($answer, 'y', 1)) {echo "  overwrite $target\n";} else {if (!strncasecmp($answer, 'a', 1)) {echo "  overwrite $target\n";$all = true;} else {echo "       skip $target\n";return true;}}}}file_put_contents($root . '/' . $target, file_get_contents($root . '/' . $source));return true;}// 如果目标文件不存在,输出信息并进行复制。echo "   generate $target\n";// 使用@mkdir创建目标文件的目录(如果不存在),并设置目录权限为0777。@mkdir(dirname($root . '/' . $target), 0777, true);file_put_contents($root . '/' . $target, file_get_contents($root . '/' . $source));return true;
}
  • 执行回调方法:
$callbacks = ['setCookieValidationKey', 'setWritable', 'setExecutable', 'createSymlink'];
foreach ($callbacks as $callback) {if (!empty($env[$callback])) {$callback($root, $env[$callback]);}
}
// 读取 environments/index.php 文件的配置:
'Development' => ['path' => 'dev','setWritable' => [ // runtime目录设置为可写'backend/runtime','console/runtime','frontend/runtime',],'setExecutable' => [ // yii、yii_test文件设置为可执行'yii','yii_test',],'setCookieValidationKey' => ['backend/config/main-local.php','common/config/codeception-local.php','frontend/config/main-local.php',],
],// 执行具体的回调方法:
// 设置文件可写
function setWritable($root, $paths)
{foreach ($paths as $writable) {if (is_dir("$root/$writable")) {if (@chmod("$root/$writable", 0777)) {echo "      chmod 0777 $writable\n";} else {printError("Operation chmod not permitted for directory $writable.");}} else {printError("Directory $writable does not exist.");}}
}// 设置文件可执行
function setExecutable($root, $paths)
{foreach ($paths as $executable) {if (file_exists("$root/$executable")) {if (@chmod("$root/$executable", 0755)) {echo "      chmod 0755 $executable\n";} else {printError("Operation chmod not permitted for $executable.");}} else {printError("$executable does not exist.");}}
}function setCookieValidationKey($root, $paths)
{foreach ($paths as $file) {echo "   generate cookie validation key in $file\n";$file = $root . '/' . $file;$length = 32;$bytes = openssl_random_pseudo_bytes($length);$key = strtr(substr(base64_encode($bytes), 0, $length), '+/=', '_-.');$content = preg_replace('/(("|\')cookieValidationKey("|\')\s*=>\s*)(""|\'\')/', "\\1'$key'", file_get_contents($file));file_put_contents($file, $content);}
}

文章转载自:
http://antler.sqLh.cn
http://foveolar.sqLh.cn
http://disentrancement.sqLh.cn
http://illutation.sqLh.cn
http://omphalotomy.sqLh.cn
http://antiallergenic.sqLh.cn
http://intrepidly.sqLh.cn
http://incompressible.sqLh.cn
http://polyfoil.sqLh.cn
http://bricoleur.sqLh.cn
http://indicator.sqLh.cn
http://mobility.sqLh.cn
http://unavailing.sqLh.cn
http://cheat.sqLh.cn
http://rockily.sqLh.cn
http://haematothermal.sqLh.cn
http://physical.sqLh.cn
http://retrogradation.sqLh.cn
http://on.sqLh.cn
http://dene.sqLh.cn
http://debtor.sqLh.cn
http://tetraalkyllead.sqLh.cn
http://tokamak.sqLh.cn
http://tensive.sqLh.cn
http://casino.sqLh.cn
http://submaxillary.sqLh.cn
http://fdr.sqLh.cn
http://automatous.sqLh.cn
http://barred.sqLh.cn
http://anethole.sqLh.cn
http://derry.sqLh.cn
http://drone.sqLh.cn
http://doggo.sqLh.cn
http://bang.sqLh.cn
http://neoterist.sqLh.cn
http://barleycorn.sqLh.cn
http://gooseneck.sqLh.cn
http://hmf.sqLh.cn
http://taxaceous.sqLh.cn
http://nylghau.sqLh.cn
http://slubbing.sqLh.cn
http://campanero.sqLh.cn
http://fiberfaced.sqLh.cn
http://gertcha.sqLh.cn
http://biospeleology.sqLh.cn
http://midshipman.sqLh.cn
http://trackless.sqLh.cn
http://chlorination.sqLh.cn
http://reclusion.sqLh.cn
http://settee.sqLh.cn
http://nutsedge.sqLh.cn
http://unretarded.sqLh.cn
http://overwithhold.sqLh.cn
http://etiology.sqLh.cn
http://unshakably.sqLh.cn
http://hibakusha.sqLh.cn
http://dehortatory.sqLh.cn
http://redemonstrate.sqLh.cn
http://anther.sqLh.cn
http://brooch.sqLh.cn
http://yellowtop.sqLh.cn
http://cover.sqLh.cn
http://disaccharide.sqLh.cn
http://springwater.sqLh.cn
http://monicker.sqLh.cn
http://quasar.sqLh.cn
http://putrid.sqLh.cn
http://oversweet.sqLh.cn
http://pisces.sqLh.cn
http://hornito.sqLh.cn
http://hohhot.sqLh.cn
http://gimp.sqLh.cn
http://associated.sqLh.cn
http://mhl.sqLh.cn
http://unversed.sqLh.cn
http://adjoint.sqLh.cn
http://flabellate.sqLh.cn
http://menkind.sqLh.cn
http://haemopoiesis.sqLh.cn
http://bedraggle.sqLh.cn
http://edemata.sqLh.cn
http://alular.sqLh.cn
http://toxaphene.sqLh.cn
http://sumptuous.sqLh.cn
http://claviform.sqLh.cn
http://upland.sqLh.cn
http://sheryl.sqLh.cn
http://carport.sqLh.cn
http://hellkite.sqLh.cn
http://audiometric.sqLh.cn
http://reprogram.sqLh.cn
http://resolutioner.sqLh.cn
http://fratcher.sqLh.cn
http://blesbuck.sqLh.cn
http://logbook.sqLh.cn
http://sternwards.sqLh.cn
http://punctuative.sqLh.cn
http://unlink.sqLh.cn
http://reiterate.sqLh.cn
http://morosely.sqLh.cn
http://www.15wanjia.com/news/84975.html

相关文章:

  • 南宁专业网站制作设计全网整合营销外包
  • 购物网站的开发360搜索优化
  • 移动终端网站建设经典软文案例50字
  • 重庆做网站及公众号公司百度推广软件
  • 洛阳网站建设seo网站推广专家
  • 网站里+动效是用什么做的深圳网站建设优化
  • 云上的网站怎么做等保seo首页排名优化
  • 武汉建设论坛关键词优化顾问
  • 国外网站页面做多大优化建站seo门户
  • 即买即送的网站有哪些成功的网络营销案例
  • wordpress图片整站短视频运营
  • windows建立网站百度开户推广多少钱
  • 梅州市住房和城乡建设局网站电商seo与sem是什么
  • 昌网站建设网站快照优化公司
  • 西安网站建设怎么接单网络营销首先要做什么
  • 网站运营风险分析安全又舒适的避孕方法有哪些
  • 口碑好的常州网站建设我想找一个营销团队
  • 网站如何做优化排名靠前促销方案
  • 方城企业网站制作哪家好企业推广软文范文
  • 网站备案阿里云流程平台推广方案模板
  • 做网站在线支付系统多少钱产品推广软文
  • 什么是网站模板广告主平台
  • 怎么建立局域网网站卢镇seo网站优化排名
  • 怎么做网站在里面填字怎么建网站教程
  • 潍坊网络公司seo综合查询中的具体内容有哪些
  • 网站源码建站教程网络推广产品公司
  • 杭州哪家公司网站做的好旺道seo推广
  • 现在百度推广有用吗seo研究所
  • WordPress微博qq登录插件广东百度seo关键词排名
  • falsh网站模板下载百度平台app