간단한 BASH 스크립트에서 간단한 PHP 스크립트를 실행하려고합니다. 이 웹 사이트의 답변은 내 문제에 대한 답변이 아닙니다.Bash 스크립트에서 PHP 스크립트 실행
여기에 여기에 내가 명령 줄에서 내 BASH 스크립트를 실행할 때 나는 다음과 같은 오류가 내 PHP 스크립트
#!/usr/bin/php
<html>
<head>
</head><body>
<?php
error_reporting(E_ALL);
ini_set('display_errors',1);
require('connect_db.php');
$timer="222222";
$railinfo2=$mysql_link->prepare('INSERT INTO stillrunning(timer) VALUES(:timer)');
$railinfo2->execute(array(':timer'=>$timer));
$mysql_link=null;
?>
</body>
</html>
내 BASH 스크립트
#!/bin/sh
railmove="/usr/bin/php -q /home/username/subfolder"
php "$railmove"/$shelltest.php
입니다.
Could not open input file: /usr/bin/php -q /home/username/subfolder/.php
내가 잘 작동 입력은/usr/빈/php에 -q /home/username/subfolder/durable2.sh 및 시도했다. 예 : 실행 중
그래서'$ shelltest'가 정의 되었습니까? –