English 中文(简体)
不用堆肥器就使用php片面仪,会产生致命错误,没有发现电流层。
原标题:Use phpspreadsheet without composer, get fatal error, class spreadsheet not found

I tried to use PHPOffice/PHPSpreadsheet without composer. The reason is, cause i don t get permissons to install composer. The company where i work have a little intranet-network, which is very old and was designed for 10years. So i updated php, phpmyadmin and designed the network new. ´Now it looks really well and some older functions work now.

当被要求更新Xampp时,公司所有人却不想这样做。 因此,i通过人工更新第8.1号。 现在需要使用购买力平价办公室。 如果单ks子允许安装堆肥器,则业主也不想这样做。

I searched a lot of post and found a solution. First install composer on my pc -> downlaod PHPOffice -> and move the folder to the netowrk xampp htdocs folder in my company.

All my scripts at home works great! After i copy the soruce directories to the htdocs directory(PhpSpreadsheet, PHPWord) in the company, i got a fatal error.

在我的实验室档案中,我把这部法典放在首位:

 require_once( src/PhpSpreadsheet/vendor/autoload.php );

The file autoload will be find. But i got this error, when i use:

    $spreadsheet = new Spreadsheet();
fatal error uncaught error class spreadsheet not found

can anyone help me please? Thank you a lot I

i 试图重新命名档案或改变道路,以检查单载档案没有装载。

  require_once( src/PhpSpreadsheet/vendor/autoload.php );

正确的道路

问题回答

在装上图书馆时,你需要具体说明“<代码”这一类别的全部名称。 Spreadsheet,即PhpOfficePhpreadsheet Spreadsheet

因此:

$spreadsheet = new PhpOfficePhpSpreadsheetSpreadsheet();

Or:

use PhpOfficePhpSpreadsheetSpreadsheet;

// Now you can refer to the Spreadsheet class without the fully qualified name
$spreadsheet = new Spreadsheet();




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签