[решено] Внедрение PEAR::Spreadsheet_Excel_Writer

Ответить
Аватара пользователя
Artem-Samsung

[решено] Внедрение PEAR::Spreadsheet_Excel_Writer

Сообщение Artem-Samsung »

Код:

Код: Выделить всё

root@kxtp:~# sudo pear install Spreadsheet_Excel_Writer-0.9.2
downloading Spreadsheet_Excel_Writer-0.9.2.tgz ...
Starting to download Spreadsheet_Excel_Writer-0.9.2.tgz (57,629 bytes)
..............done: 57,629 bytes
install ok: channel://pear.php.net/Spreadsheet_Excel_Writer-0.9.2

php.ini



Код:

Код: Выделить всё

; UNIX: "/path1:/path2"
include_path = ".:/usr/share/php"
include_path = ".:/web/apache2/phplib"



PHP код:

Код: Выделить всё

require_once 'Spreadsheet/Excel/Writer.php';
// Creating a workbook
$workbook = new Spreadsheet_Excel_Writer(); 






Ошибка:



Код:

Код: Выделить всё

Warning: require_once(Spreadsheet/Excel/Writer.php) [function.require-once]: failed to open stream: No such file or directory in /web/sites/site.com/djone/xml.php on line 2
Fatal error: require_once() [function.require]: Failed opening required 'Spreadsheet/Excel/Writer.php' (include_path='.:/web/apache2/phplib') in /web/sites/site.com/djone/xml.php on line 2



Код:

Код: Выделить всё

root@kxtp:/usr/share/php# ls
Archive              Console  OLE      PEAR5.php    PHPUnit      test
class.phpmailer.php  data     OLE.php  pearcmd.php  Spreadsheet  tests
class.pop3.php       doc      OS       PEAR.php     Structures   XML
class.smtp.php       docs     PEAR     peclcmd.php  System.php



Как подключить библиотеку Spreadsheet_Excel_Writer ?



Решение:

Прошу прощения. Невнимательный

В PHP.ini правильно так:

include_path = ".:/usr/share/php:/web/apache2/phplib"
Ответить

Вернуться в «Вебмастеру»