我的目标是将一个composer.json文件提交到我们的项目存储库,该文件指定应该为该项目使用哪些主题或插件,当开发人员下载回购时,他们需要做的就是运行composer install.我们希望将插件保留在项目仓库之外,以阻止项目仓库的膨胀,并且拉动和推动变得缓慢.
对于标准的wordpress插件,例如"Jetpack by WordPress.com",这很好,因为我们将使用https://wpackagist.org/.但是,对于支付插件和内部定制的Premium而无法开源的我们希望将它们托管在Private Composer Repository中.
因为我们将有这些插件的多个版本,我希望所有版本都能显示,如1.1,1.2,1.3,因此开发人员可以在composer.json中指定哪个版本是必需的,例如,如果未来的版本破坏了某些东西,我们需要回滚到以前的版本.
我已经阅读了设置Satis私有存储库的基础知识,我已经这样做但是我不能让它循环遍历版本的git标签,并指定它是一个Wordpress插件并将其安装在正确的位置.
这是我第一次获得所有git标记版本的尝试:
{
"name": "Private Repository",
"homepage": "http://packages.privaterepo.com",
"repositories": [
{
"type": "vcs",
"url": "git@bitbucket.org:companyname/project.git"
}
],
"require-all": true
}
Run Code Online (Sandbox Code Playgroud)
这是我必须指定版本,但让它安装在正确的Wordpress插件位置:
{
"name": "Private Repository",
"homepage": "http://packages.privaterepo.com",
"repositories": [
{
"type": "package",
"package": {
"name": "company/project",
"description": "WordPress Plugin",
"version": "1.0",
"source": {
"type": "git",
"url": "git@bitbucket.org:company/project.git",
"reference": "origin/master"
},
"type": "wordpress-plugin",
"require": {
"php": ">=5.3.2",
"composer/installers": "*"
}
}
}
],
"require-all": true,
"require-dependencies": true,
"extra": { …Run Code Online (Sandbox Code Playgroud) 请任何人都可以告诉我如何实现它。这是对我的要求。非常感谢
function GetCustomerDetails() {
$url = 'https://api.ezypay.com/api/v1/customers/11111111-1111-1111-1111-1111';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, "aZj1zkAivrnZiiWpiM71O3hBUAAN6S:a");
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Accept: application/json',
'Content-Length: ' . strlen($data))
);
Run Code Online (Sandbox Code Playgroud) 我已经从服务器转移到另一个的opencart转移,我收到以下错误解析错误:语法错误,意外T_ELSE,期待第54行/home/petit/public_html/system/database/mysqli.php中的T_FUNCTION
当我尝试访问我的网站或管理员页面时.知道为什么会这样吗?我一步一步地遵循了这个程序.
这是mysqli.php
<?php
final class MySQLi {
private $mysqli;
public function __construct($hostname, $username, $password, $database) {
$this->mysqli = new mysqli($hostname, $username, $password, $database);
if ($this->mysqli->connect_error) {
trigger_error('Error: Could not make a database link (' . $this->mysqli->connect_errno . ') ' . $this->mysqli->connect_error);
}
$this->mysqli->query("SET NAMES 'utf8'");
$this->mysqli->query("SET CHARACTER SET utf8");
$this->mysqli->query("SET CHARACTER_SET_CONNECTION=utf8");
$this->mysqli->query("SET SQL_MODE = ''");
}
public function query($sql) {
$result = $this->mysqli->query($sql);
if ($this->mysqli->errno) {
//$mysqli->errno
}
if (is_resource($resource)) {
$i = 0;
$data = array();
while ($row …Run Code Online (Sandbox Code Playgroud) function fnEncrypt($key,$string){
return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $string, MCRYPT_MODE_CBC, md5($key)));
}
Run Code Online (Sandbox Code Playgroud)
和
fnEncrypt("6abd9b547f8d23b367dff1fc4g7ad457b7f7f85e","AB10|13213123");
Run Code Online (Sandbox Code Playgroud)
我收到了警告信息
警告:mcrypt_encrypt():此算法的密钥大小太大
怎么解决这个?提前致谢