docker-tars icon indicating copy to clipboard operation
docker-tars copied to clipboard

tars-php 启动不了服务

Open waynesun01 opened this issue 5 years ago • 0 comments

按照文档和代码,到最后启动服务时出现如下错误 : No such file or directorye/data/PHPTest.PHPHttpServer/bin/src/index.php: line 1: ?php /usr/local/app/tars/tarsnode/data/PHPTest.PHPHttpServer/bin/src/index.php: line 2: require_once: command not found /usr/local/app/tars/tarsnode/data/PHPTest.PHPHttpServer/bin/src/index.php: line 2: $'\r': command not found /usr/local/app/tars/tarsnode/data/PHPTest.PHPHttpServer/bin/src/index.php: line 3: use: command not found /usr/local/app/tars/tarsnode/data/PHPTest.PHPHttpServer/bin/src/index.php: line 3: $'\r': command not found /usr/local/app/tars/tarsnode/data/PHPTest.PHPHttpServer/bin/src/index.php: line 4: =: command not found /usr/local/app/tars/tarsnode/data/PHPTest.PHPHttpServer/bin/src/index.php: line 4: $'\r': command not found /usr/local/app/tars/tarsnode/data/PHPTest.PHPHttpServer/bin/src/index.php: line 5: syntax error near unexpected token (' 'usr/local/app/tars/tarsnode/data/PHPTest.PHPHttpServer/bin/src/index.php: line 5: $pos = strpos($config_path, '--config='); : No such file or directorye/data/PHPTest.PHPHttpServer/bin/src/index.php: line 1: ?php /usr/local/app/tars/tarsnode/data/PHPTest.PHPHttpServer/bin/src/index.php: line 2: require_once: command not found /usr/local/app/tars/tarsnode/data/PHPTest.PHPHttpServer/bin/src/index.php: line 2: $'\r': command not found /usr/local/app/tars/tarsnode/data/PHPTest.PHPHttpServer/bin/src/index.php: line 3: use: command not found /usr/local/app/tars/tarsnode/data/PHPTest.PHPHttpServer/bin/src/index.php: line 3: $'\r': command not found /usr/local/app/tars/tarsnode/data/PHPTest.PHPHttpServer/bin/src/index.php: line 4: =: command not found /usr/local/app/tars/tarsnode/data/PHPTest.PHPHttpServer/bin/src/index.php: line 4: $'\r': command not found /usr/local/app/tars/tarsnode/data/PHPTest.PHPHttpServer/bin/src/index.php: line 5: syntax error near unexpected token (' 'usr/local/app/tars/tarsnode/data/PHPTest.PHPHttpServer/bin/src/index.php: line 5: $pos = strpos($config_path, '--config=');

<?php
/**
 * Created by PhpStorm.
 * User: dingpanpan
 * Date: 2017/12/2
 * Time: 17:00.
 * index.php
 */
require_once __DIR__.'/vendor/autoload.php';
use \Tars\cmd\Command;
//php tarsCmd.php  conf restart
$config_path = $argv[1];
$pos = strpos($config_path, '--config=');
$config_path = substr($config_path, $pos + 9);
$cmd = strtolower($argv[2]);
$class = new Command($cmd, $config_path);
$class->run();

不知道是哪里设置错了,第一次研究tars-php 还望指教一二,十分感谢

waynesun01 avatar Sep 07 '19 10:09 waynesun01