无法在 Ubuntu 中 运行 php 编写脚本
Unable to run php script in Ubuntu
我 运行ning Ubuntu 12.04 安装了这些 php 软件包:
php5、php5-cli 和 php5-common
安装的php版本是
$ php -v
PHP 5.3.10-1ubuntu3.25 with Suhosin-Patch (cli) (built: Oct 3 2016 16:53:10) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
当我下载 运行 脚本时
使用
php AdobeHDS.php --help
我希望获得有关 AdobeHDS.php 命令允许的命令行开关的帮助。
相反,我看到的是 html 与脚本内容相同的输出。
$ php AdobeHDS.php --help > out.html
$ diff AdobeHDS.php out.html
$
根据
http://forum.videohelp.com/threads/342430-F4F-capturing-converting/page2
脚本应该识别 --help 开关。
使用 --manifest 等任何其他开关也会产生
类似的行为。
我需要有关如何成功 运行 这个脚本的帮助。
最好的猜测,您在 https://github.com/K-S-V/Scripts/blob/master/AdobeHDS.php , because diff could not find any differences, it means PHP could not find any <?php
tag to execute. (the only exception to this would be if the source was a Quine 下载了实际的 HTML 文件)
下载脚本的正确方法:
wget https://github.com/K-S-V/Scripts/raw/master/AdobeHDS.php
注意它在 url 中有一个 /raw/ :) 它会下载这个 https://github.com/K-S-V/Scripts/raw/master/AdobeHDS.php
此外,github 处的 HTML 代码实际上并不包含任何 <?php
,它只是在您的网络浏览器解析时看起来是这样,实际上,它是由github 作为 <?php
,根据 https://www.rfc-editor.org/rfc/rfc2629
我 运行ning Ubuntu 12.04 安装了这些 php 软件包: php5、php5-cli 和 php5-common
安装的php版本是
$ php -v
PHP 5.3.10-1ubuntu3.25 with Suhosin-Patch (cli) (built: Oct 3 2016 16:53:10) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
当我下载 运行 脚本时
使用
php AdobeHDS.php --help
我希望获得有关 AdobeHDS.php 命令允许的命令行开关的帮助。
相反,我看到的是 html 与脚本内容相同的输出。
$ php AdobeHDS.php --help > out.html
$ diff AdobeHDS.php out.html
$
根据 http://forum.videohelp.com/threads/342430-F4F-capturing-converting/page2 脚本应该识别 --help 开关。
使用 --manifest 等任何其他开关也会产生 类似的行为。
我需要有关如何成功 运行 这个脚本的帮助。
最好的猜测,您在 https://github.com/K-S-V/Scripts/blob/master/AdobeHDS.php , because diff could not find any differences, it means PHP could not find any <?php
tag to execute. (the only exception to this would be if the source was a Quine 下载了实际的 HTML 文件)
下载脚本的正确方法:
wget https://github.com/K-S-V/Scripts/raw/master/AdobeHDS.php
注意它在 url 中有一个 /raw/ :) 它会下载这个 https://github.com/K-S-V/Scripts/raw/master/AdobeHDS.php
此外,github 处的 HTML 代码实际上并不包含任何 <?php
,它只是在您的网络浏览器解析时看起来是这样,实际上,它是由github 作为 <?php
,根据 https://www.rfc-editor.org/rfc/rfc2629