警告: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
最满意答案
假设那天是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... });
-
如何初始化kendo ui调度程序数据模型创建新的(How to initialize kendo ui scheduler data model on create new)[2024-01-15]
我已经测试了描述的行为,并且它在我身边正常工作。 这是我的测试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 (如果您总是想要重新创建它,但如果用户删除它,它应该在我看来保持删除)。 或者,如果 ...
-
我同意这可能是不成熟的优化,但如果您想要高性能的设计,然后签出原型设计模式 原型模式是软件开发中使用的创建型设计模式,当要创建的对象类型由原型实例确定时,该原型实例被克隆以生成新对象。 这种模式用于: 避免客户端应用程序中的对象创建者的子类,就像抽象工厂模式一样。 避免以标准方式创建新对象的固有成本(例如,使用“新”关键字),因为对于给定的应用程序而言,这是非常昂贵的。 与对象池模式一起 对象池是一组准备好使用的初始化对象,而不是按需分配和销毁。 池的客户端将从池中请求一个对象并对返回的对象执行操作。 当客 ...
-
FullCalendar cakephp:显示日历上相关模型的数据(FullCalendar cakephp: display data from associated model on calendar)[2022-05-22]
以下是日历事件 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", ... -
Outlook加载项:对日历事件日期和时间更改采取操作(Outlook add-in: take action on calendar event date and time changes)[2023-04-22]
这是通过Microsoft Graph利用Webhook Subscriptions和Event Deltas完成的。 每当检测到日历更改时,webhook就会被触发。 当您收到该事件时,您将从Microsoft Graph请求日历增量。 这将为您提供自上次调查以来所发生的所有事件。 在这里,您可以请求特定事件,包括您之前使用该事件存储的任何扩展数据。 至于续订,当您创建订阅时,它将返回该订阅的expirationDateTime 。 当您的订购到期时,您可以续订并获得新的到期日期: PATCH https ...