我正在尝试根据我在这里找到的内容创建一个zip脚本,但我似乎遇到致命错误:在新的ZipArchive()上找不到类'ZipArchive'错误; 功能.
研究这似乎通常是由于PHP的编译方式.我有一个共享主机帐户,所以我没有配置任何这些东西......我认为我不能对构建进行任何更改.出于兴趣,我看了一下我的phpinfo(),我找到了一些看似相关的东西:
PHP版本5.2.6
BZip2 Support Enabled <--maybe not so relevant
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.1.4
Linked Version 1.1.4
Run Code Online (Sandbox Code Playgroud)
我并不十分确定这是否意味着我有能力创建拉链.有关更多信息(虽然我不认为它是重温的)这里是我的脚本到目前为止....这是未经考验的头脑你,因为我无法得到这个类未找到错误.
$file = tempnam("tmp", "zip");
$zip = new ZipArchive();
$zip->open($file, ZipArchive::OVERWRITE);
//the string "file1" is the name we're assigning the file in the archive
$zip->addFile('show1.jpg', 'file1.jpg');
$zip->addFile('show2.jpg', 'file2.jpg');
$zip->addFile('show3.jpg', 'file3.jpg');
$zip->addFile('show4.jpg', 'file4.jpg');
$zip->addFile('show5.jpg', 'file5.jpg');
$zip->addFile('show6.jpg', 'file6.jpg');
// echo $zip->file(); //this sends the compressed archive to the output buffer instead …Run Code Online (Sandbox Code Playgroud) 我确定这很简单,但我找不到任何相关信息.
我有一个Excel宏,其中包含:
ActiveWorkbook.Worksheets("Data 21 Oct 12 11-05").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Data21 Oct 12 11-05").Sort.SortFields.Add Key _
:=Range("W1:W23"), SortOn:=xlSortOnValues, Order:=xlDescending, _
DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Data 21 Oct 12 11-05").Sort
.SetRange Range("A1:BZ23")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Run Code Online (Sandbox Code Playgroud)
我想要做的是使它成为一个全局宏,但文件名在宏中是硬编码的.如何更改代码以使其引用"this"当前打开的文件?
我正在尝试按照此处所述设置CSS渐变的动画,但我无法让它工作.作为一个例子,我把这个 jsfiddle 放在一起.
作为概述,似乎渐变上的CSS转换似乎不起作用.
div#Machine {
-webkit-transition: background 5s;
-moz-transition: background 5s;
-ms-transition: background 5s;
-o-transition: background 5s;
transition: background 5s;
background: rgb(71, 234, 46);
background: -moz-linear-gradient(top, rgba(71, 234, 46, 1) 0%, rgba(63, 63, 63, 1) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(71, 234, 46, 1)), color-stop(100%, rgba(63, 63, 63, 1)));
background: -webkit-linear-gradient(top, rgba(71, 234, 46, 1) 0%, rgba(63, 63, 63, 1) 100%);
background: -o-linear-gradient(top, rgba(71, 234, 46, 1) 0%, rgba(63, 63, 63, …Run Code Online (Sandbox Code Playgroud)