首页 \ 问答 \ 警告:include(PHPExcel.php):无法打开流:没有这样的文件或目录(Warning: include(PHPExcel.php): failed to open stream: No such file or directory)

警告:include(PHPExcel.php):无法打开流:没有这样的文件或目录(Warning: include(PHPExcel.php): failed to open stream: No such file or directory)

我试图实现使用PHPExcel将XLS文件中的单页转换为CSV - 内存耗尽但在PHP Excel加载过程中陷入困境。

我下载了包( http://phpexcel.codeplex.com/ ),按照安装说明将“Classes”文件夹复制到三个目录:

1)C:\ xampp \ htdocs \ mycode - 只是我当前的工作目录

2)C:\ xampp \ php \ pear - bcs当我echo get_include_path();时得到的东西echo get_include_path();

3)C:\ xampp \ php \ pear \ PEAR - 你知道,以防万一......

我还在跑的时候:

include 'PHPExcel.php';
include 'PHPExcel/IOFactory.php';

我收到以下错误消息:

警告:include(PHPExcel.php):无法打开流:第5行的C:\ xampp \ htdocs \ mycode \ paths.php中没有此类文件或目录

警告:include():在第5行的C:\ xampp \ htdocs \ mycode \ paths.php中打开'PHPExcel.php'以包含(include_path ='。; C:\ xampp \ php \ PEAR')失败

警告:include(PHPExcel / IOFactory.php):无法打开流:第6行的C:\ xampp \ htdocs \ mycode \ paths.php中没有此类文件或目录

警告:include():在第6行的C:\ xampp \ htdocs \ mycode \ paths.php中打开'PHPExcel / IOFactory.php'以包含(include_path ='。; C:\ xampp \ php \ PEAR')失败

事先提前...


Im trying to implement Converting single sheet in an XLS file to CSV with PHPExcel - Memory exhausted but got stuck in the PHP Excel loading process.

I downloaded the pack (http://phpexcel.codeplex.com/) and, following the install instructions, copied the folder 'Classes' to three directories:

1) C:\xampp\htdocs\mycode - just my current working directory

2) C:\xampp\php\pear - bcs its what i get when I echo get_include_path();

and

3) C:\xampp\php\pear\PEAR - you know, just in case...

still when I run:

include 'PHPExcel.php';
include 'PHPExcel/IOFactory.php';

I get the following error messages:

Warning: include(PHPExcel.php): failed to open stream: No such file or directory in C:\xampp\htdocs\mycode\paths.php on line 5

Warning: include(): Failed opening 'PHPExcel.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\mycode\paths.php on line 5

Warning: include(PHPExcel/IOFactory.php): failed to open stream: No such file or directory in C:\xampp\htdocs\mycode\paths.php on line 6

Warning: include(): Failed opening 'PHPExcel/IOFactory.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\mycode\paths.php on line 6

tks in advance...


原文:https://stackoverflow.com/questions/20621834
更新时间:2023-08-12 06:08

最满意答案

假设那天是start_date(否则我被误解了),格式对我来说似乎并不坏。 稍后您可能需要有开始/结束日期以及开始/结束时间,在这种情况下,您将不得不设置时间戳。

为了检索数据,我创建了一个日期表,如:

+------------+
| cday (PK)  |
+------------+
| ...        |
| 2011-01-01 |
| 2011-01-02 |
| 2011-01-03 |
| 2011-01-04 |
| 2011-01-05 |
| 2011-01-06 |
| ...        |
+------------+

如果您需要在给定时间段内获得状态为A(可用)的约会,您可以执行类似的操作

SELECT ev.*
FROM cdays AS cd
JOIN event AS ev ON (
  CHECK_RECCUR(cd.cday, ev.day, cd.recurring)
)
WHERE TRUE
  AND cd.cday BETWEEN "given_start" AND "given_end"
  AND ev.day < "given_end"
;

CHECK_RECCUR()将是一个检查cday是否在reccurence范围内的函数,如下所示:

CREATE FUNCTION CHECK_RECCUR(cday DATE, start_date DATE, recurring CHAR(1))
BEGIN
  IF cday < start_date
  THEN RETURN FALSE
  END IF;
  SET dformat = CASE recurring
    WHEN 'W' THEN '%W'
    WHEN 'M' THEN '%d'
    WHEN 'Y' THEN '%m-%d'
    ELSE ''
  END;
  RETURN (DATE_FORMAT(cday, dformat) == DATE_FORMAT(start_date, dformat));
END
;

没有测试,但这是我要做的


Assuming that day is a start_date (otherwise I misunderstood), the format seems not bad to me. Later on maybe you will need to have start/end dates and maybe start/end time, in that case you will have to put timestamps instead.

In order to retrieve the data, I'd have a dates table created like:

+------------+
| cday (PK)  |
+------------+
| ...        |
| 2011-01-01 |
| 2011-01-02 |
| 2011-01-03 |
| 2011-01-04 |
| 2011-01-05 |
| 2011-01-06 |
| ...        |
+------------+

If you need to get the appointments with the status A (available) for a given period, you can do something like

SELECT ev.*
FROM cdays AS cd
JOIN event AS ev ON (
  CHECK_RECCUR(cd.cday, ev.day, cd.recurring)
)
WHERE TRUE
  AND cd.cday BETWEEN "given_start" AND "given_end"
  AND ev.day < "given_end"
;

CHECK_RECCUR() would be a function that checks if cday is in the scope of reccurence, like that:

CREATE FUNCTION CHECK_RECCUR(cday DATE, start_date DATE, recurring CHAR(1))
BEGIN
  IF cday < start_date
  THEN RETURN FALSE
  END IF;
  SET dformat = CASE recurring
    WHEN 'W' THEN '%W'
    WHEN 'M' THEN '%d'
    WHEN 'Y' THEN '%m-%d'
    ELSE ''
  END;
  RETURN (DATE_FORMAT(cday, dformat) == DATE_FORMAT(start_date, dformat));
END
;

Not tested but this is what I'd do

相关问答

更多
  • 总结评论: 不要从Feed中发送所有事件,而只发送start和end之间发生的事件,这些事件是fullCalendar发送到feed页面的参数。 它们以秒为单位作为unix时间戳发送。 To summarize the comments: Don't send all events from the feed but only the ones that occurs between start and end which are parameters sent by fullCalendar to the ...
  • 事实证明,当使用Ruby Google API Client时,透明度字段仅在事件被用户标记为“可用”时包含在事件资源中。 根据文档,默认值为“不透明”。 据推测,当透明度字段不存在于事件资源中时,则日历上的事件应被视为“不透明”或“阻塞”。 在API客户端中生成的请求主体中,这应该产生nil值而不是“透明”值。 不是最干净的东西,但我认为它可行。 So as it turns out, when using the Ruby Google API Client, the transparency fiel ...
  • 每个事件对象都需要以下属性: 标题 开始于 颜色 尝试用这些属性来构建你的对象 SalesNotifyService.getAllNotify().success(function(data) { $scope.events = []; angular.forEach(data,function(event,key){ $scope.events.push({ title: event.employeeName, startsA ...
  • 请参阅: clientEvents 您还可以使用以下功能: mycal.fullCalendar('clientEvents', function(ev) { // ev is Event object... }); See: clientEvents You can also use a function, like: mycal.fullCalendar('clientEvents', function(ev) { // ev is Event object... });
  • 我已经测试了描述的行为,并且它在我身边正常工作。 这是我的测试dojo 。 I have tested the described behavior and it worked correctly at my side. Here is my test dojo.
  • 假设那天是start_date(否则我被误解了),格式对我来说似乎并不坏。 稍后您可能需要有开始/结束日期以及开始/结束时间,在这种情况下,您将不得不设置时间戳。 为了检索数据,我创建了一个日期表,如: +------------+ | cday (PK) | +------------+ | ... | | 2011-01-01 | | 2011-01-02 | | 2011-01-03 | | 2011-01-04 | | 2011-01-05 | | 2011-01-06 | | .. ...
  • 基本上..不要多次添加它。 您发布的代码部分被多次调用。 为此,请将savedEventId保存在应用中的某个位置。 这取决于该事件代表什么,您的应用保存了多少事件等等。 如果您的应用只添加一个事件,则可以使用NSUserDefaults将savedEventId存储在特定键上(例如@"myEventId" )。 之后您可以检查是否已保存事件(通过检查NSUserDefaults ),以及事件是否仍然存在于EventKit (如果您总是想要重新创建它,但如果用户删除它,它应该在我看来保持删除)。 或者,如果 ...
  • 我同意这可能是不成熟的优化,但如果您想要高性能的设计,然后签出原型设计模式 原型模式是软件开发中使用的创建型设计模式,当要创建的对象类型由原型实例确定时,该原型实例被克隆以生成新对象。 这种模式用于: 避免客户端应用程序中的对象创建者的子类,就像抽象工厂模式一样。 避免以标准方式创建新对象的固有成本(例如,使用“新”关键字),因为对于给定的应用程序而言,这是非常昂贵的。 与对象池模式一起 对象池是一组准备好使用的初始化对象,而不是按需分配和销毁。 池的客户端将从池中请求一个对象并对返回的对象执行操作。 当客 ...
  • 以下是日历事件 JSON表示的外观 { id: "id value", end: "end date", //when event ends - required field start: "start date", // when event starts - required field title: "title value", textColor: "color value", className: "add your style Class", ...
  • 这是通过Microsoft Graph利用Webhook Subscriptions和Event Deltas完成的。 每当检测到日历更改时,webhook就会被触发。 当您收到该事件时,您将从Microsoft Graph请求日历增量。 这将为您提供自上次调查以来所发生的所有事件。 在这里,您可以请求特定事件,包括您之前使用该事件存储的任何扩展数据。 至于续订,当您创建订阅时,它将返回该订阅的expirationDateTime 。 当您的订购到期时,您可以续订并获得新的到期日期: PATCH https ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)