以下页面上的第 6 点描述了如何使用脚本导入数据:http://innoexts.com/currency-pricing/#.UjI1uPlgaHo
问题是该示例提供了一个 shell 脚本,因此我在尝试从浏览器运行它时出现错误。 有什么方法可以将这些类型的脚本作为浏览器运行,因为我无法访问 Shell?
我想出了解决这个问题的方法。 只需要注释掉/shell/abstract 中受保护函数 _validate() 的内容.php
in shell/abstract.php 在下面添加一行
protected $_factory; // Line 76
如
protected $_passvalidation = false;
然后更改函数 __construct()
$this->_validate();
自
if(!$this->_passvalidation) $this->_validate();
在您的外壳脚本中添加
function __construct() {
$this->_passvalidation = true;
parent::__construct();
}