仅限PowerShell中的Docker-Compose错误:"无法连接到docker守护程序...."

时间:2016-05-06 05:48:29

标签: powershell docker

执行docker-compose命令时,我在powershell中遇到错误: enter image description here

虽然同样的命令在Docker Quickstart Terminal中正常工作: enter image description here

1 个答案:

答案 0 :(得分:3)

确保首先在Powershell会话中设置了正确的环境变量。

请参阅docker-machine env

<?php
session_start();
include'database.php';
$ssmain = $_SESSION['sessionsmain'];
$conn = mysqli_connect($server, $dbusername, $dbpassword, $database);
if (!$conn) {
    die("Connection failed: " . mysqli_connect_error());
}
$sql = "SELECT * FROM employee where E_ID = '$ssmain' || LastName like '%$ssmain' || FirstName like '%$ssmain'";
$no=0;
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) { ?>


<table class="table  table-hover">
        <thead>
            <tr>
		
		<th>ID</th>
		<th>Last Name</th>
        <th>First Name</th>
		
 		
            </tr>
        </thead>
        <tbody>

<?php
while($row = mysqli_fetch_assoc($result)) {
$no++;
?>
 	 <tr>
		
		<td><a href="employeerecord.php"><?php  $_SESSION['ttid'] = $row['E_ID']; echo"{$row['E_ID']}";  ?></a></td>
		
        <td><?php echo"{$row['FirstName']}"; ?></td>
	    <td><?php echo"{$row['LastName']}"; ?></td>
  
        </tr>

  <?php
}
}
 else 
{
header('location: error404.php');
}

?>

         </tbody>


    </table>

替换&#39; FB.api('/me', function(response) { console.log(response); }); &#39;用你的机器名称。