我的应用程序流程如下所示:
/spotify-callback/并打开名为SpotifyCallbackPage的页面,但是我得到了错误console.error: Got a deeplink that didn't match我的深层链接代码如下:
deeplinks.route({
'/spotify-callback/': SpotifyCallbackPage
}).subscribe((match) => {
// match.$route - the route we matched, which is the matched entry from the arguments to route()
// match.$args - the args passed in the link
// match.$link - the full link data
console.log('Successfully matched route', match);
}, (nomatch) => {
// nomatch.$link - the full link data
console.error('Got a deeplink that didn\'t match');
console.log(nomatch);
}); …Run Code Online (Sandbox Code Playgroud) 我正在使用Docker Compose来构建我的第一台Docker机器.我想安装Docker有PHP-FPM 7,Nginx和MySQL(使用MariaDB).
这是我的docker-compose.yml
version: '2'
services:
nginx:
image: nginx:latest
ports:
- "80:80"
volumes:
- ./nginx/site.conf:/etc/nginx/conf.d/default.conf
- ./logs/nginx-error.log:/var/log/nginx/error.log
- ./logs/nginx-access.log:/var/log/nginx/access.log
- ./public:/usr/share/nginx/html
links:
- phpfpm
phpfpm:
image: php:7-fpm
volumes:
- ./public:/usr/share/nginx/html
- ./logs/log.conf:/usr/local/etc/php-fpm.d/zz-log.conf
mariadb:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: admin
MYSQL_DATABASE: admin
MYSQL_USER: admin
MYSQL_PASSWORD: admin
volumes:
- ./database:/var/lib/mysql
Run Code Online (Sandbox Code Playgroud)
Docker正确启动但是当我尝试使用mysql_connect连接到index.php中的数据库时,我得到错误:
致命错误:未捕获错误:在/usr/share/nginx/html/index.php:7中调用未定义函数mysql_connect()堆栈跟踪:#us {/}////////////////////////在第7行
这是我的index.php
<?php
$username = "admin";
$password = "admin";
$hostname = "localhost";
//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
echo "Connected to …Run Code Online (Sandbox Code Playgroud)