草庐IT

Move_uploaded_file

全部标签

javascript - 从 JQuery 内部调用 PHP 函数 file_put_contents

我在JQuery中有一个函数,当满足条件时调用PHP函数。一切顺利,直到我可以file_put_contents。似乎必须抛出某种JQuery不知道如何解释的输出。这是我的代码:JQuery部分,其中$downloader是类实例,finishedDownloading是一个javascript变量:if(finishedDownloading==_totalFiles?>){MergePDFs();?>}到目前为止一切顺利。这是我的php:functionMergePDFs(){$combinedFiles="";foreach($this->_fileNamesArrayas$fi

php - 使用 Kendo Upload 的 Kendo Grid 内联编辑返回空结果

我有KendoUIGrid和inline编辑和我的字段之一(propertyLogo)我使用kendoUpload上传图像。使用kendoUpload函数fileUploadEditor,我使用saveUrl:"./image.php",并将图像转换为base64格式以保存到数据库中.当我添加/编辑时,我设法成功更新所有字段,但propertyLogo字段除外,它返回NULL结果。我不知道我做错了哪一部分,但我无法将图像保存到数据库中。在这里,我将提供我的脚本。我的数据源和网格/****************//**DATASOURCE**//****************/var

php - 德鲁巴 : File upload required?

出于某种原因,当我尝试使文件上传成为必需时,我的表单中断了。这是它的代码:$form_id="upload_form";$form[$form_id]=array('#type'=>'fieldset','#description'=>t('ThisisautilitytoimportnodesfromaCommaSeparatedValuefile.Tobegin,pickanodetype,anduploadaCSV.'),);$form[$form_id]['type']=array('#title'=>t('Enternodetype'),'#type'=>'textfield

CakePHP 中的 PHPExcel : error--excel file incompatible or corrupted

我正在使用Cake;当我使用生成函数在浏览器中打开excel文件时:我从MicrosoftExcel中收到此错误:Excelcannotopenthefile'Groupslist.xlsx'becausethefileformatorfileextensionisnotvalid.Verifythatthefilehasnotbeencorruptedandthatthefileextensionmatchestheformatofthefile.我试过从浏览器下载文件后去掉文件名中的空格,然后再次打开,它显示了与上述相同的错误。任何人都经历过这个并解决了它?或者有什么线索吗?基本上

php - file_get_contents() 作用于 facebook api

file_get_contents()[function.file-get-contents]:SSL:Connectionresetbypeerin上file_get_contents("https://api.facebook.com/method/events.invite?eid=".$eid."&uids=".json_encode($uids)."&access_token=".$facebook->getAccessToken())它邀请他们选择的用户friend参加事件,但是我在这篇文章的顶部遇到了错误。用cURL测试,同样的错误。已测试我回去用cURL测试了一些东西$

php - 使用 vfsStream 测试 move_uploaded_file 和 is_uploaded_file

我尝试使用PHPUnit和vfsStream测试move_uploaded_file和is_uploaded_file。他们总是返回错误。publicfunctiontestShouldUploadAZipFileAndMoveIt(){$_FILES=array('fieldName'=>array('name'=>'file.zip','type'=>'application/zip','tmp_name'=>'vfs://root/file.zip','error'=>0,'size'=>0,));vfsStream::setup();$vfsStreamFile=vfsStre

当 allow_url_fopen 打开时,php file_get_contents 返回 null

我收到警告消息:file_get_contents未能打开流权限被拒绝我已经在php.ini文件中将all_url_open设置为on。我的php文件在我的apache服务器中,它试图从同一台机器上的tomcat服务器访问一个url(返回JSON)。php文件中的代码如下所示:$srcURL='http://samemachine:8080/returnjson/';$results=file_get_contents($srcURL);我也尝试过curl,但它什么也没返回,也没有访问tomcat服务器:functioncurl($url){$ch=curl_init();curl_s

PHP parse_ini_file 相对路径?

我有这个代码:$test=parse_ini_file("../data/test.ini");test.ini位于后一个目录,然后转到数据文件夹。但我遇到的问题是parse_ini_file不喜欢我建立文件的相对链接,任何人都可以帮助我在不建立文件绝对链接的情况下做到这一点吗? 最佳答案 你可以试试这个:$test=parse_ini_file(realpath("../data/test.ini"));参见this链接或者你可以直接使用绝对路径。 关于PHPparse_ini_fil

ssl - file_get_contents() 无法在 youtube 上正常工作

我想从youtube获取数据,我正在使用file_get_contents()方法。有时它工作正常但有时它不工作并显示以下错误file_get_contents()[function.file-get-contents]:SSL:cryptoenablingtimeoutfile_get_contents()[function.file-get-contents]:Failedtoenablecryptofile_get_contents(https://gdata.youtube.com/feeds/api/users/default?access_token=token&v=2&a

php - $_FILES ['file' ] ['tmp_name' ] 什么时候被删除?

上传的文件将在名为$_FILES['file']['tmp_name']的临时文件夹中的某处存储多长时间? 最佳答案 它在documentation中:Thefilewillbedeletedfromthetemporarydirectoryattheendoftherequestifithasnotbeenmovedawayorrenamed. 关于php-$_FILES['file']['tmp_name']什么时候被删除?,我们在StackOverflow上找到一个类似的问题: