我以前没用过梨,所以我可能是在做些蠢事。我已经安装了Math_Matrix库,但是当我包含它时,我只会得到一个错误。我的全部代码是:
<?php
$path = '/home/PEAR/Math_Matrix-0.8.0';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
include_once 'Matrix.php';
?>我得到的错误是:
Parse error: syntax error, unexpected T_CLONE, expecting T_STRING in /home/PEAR/Math_Matrix-0.8.0/Matrix.php on line 272我真不知道该怎么做。我想我能想到的解释是:
Matrix.php
为了安装它,我做了以下工作:
pear install --alldeps channel://pear.phpunit.de/PHPUnit
pear install --alldeps channel://pear.php.net/Math_Vector-0.6.2
pear install Math_Matrix发布于 2009-01-10 15:41:21
从Math_Matrix中我可以看到它上一次更新是在2003年。从那时起,PHP添加了clone keyword,这与在Matrix.php中定义的clone()函数相冲突。
您需要更新Matrix.php &在“克隆”上搜索和替换"clone2“应该可以做到这一点。
https://stackoverflow.com/questions/431090
复制相似问题