草庐IT

result_dir

全部标签

PHP - 具有相对路径的 include() 或 require() 在 Windows 上不起作用,即使在附加 __DIR__ 时也是如此

我在这里读到有关在将include()或required()与相对路径一起使用时PHP中出现的问题,我看到的所有解决方案都是附加DIR我目前在Windows上工作,尽管错误消息显示了DIR的当前值,但相对路径似乎是作为字符串添加的,而不是向上一级,例如:include(__DIR__."..\\another_folder\\file_2.php");产生以下错误:警告:包括(C:\xampp\htdocs\main_folder..\another_folder\file_2.php)[function.include]:无法打开流:在中没有这样的文件或目录知道发生了什么吗?

php - 扩展 mysqli_result - 它使用 store_result() 还是 use_result()

我用返回mysqli_result的子项的查询方法编写了一个mysqli的子项。此结果子项将具有我的应用独有的其他方法。publicMySQLextendsmysqli{publicfunctionquery($query){if($this->real_query($query)){if($this->field_count>0){returnnewMySQL_Result($this);}returntrue;}returnfalse;}}classMySQL_Resultextendsmysqli_result{publicfunctionfetch_objects(){$row

php/mysqli : should I free_result before I return?

Ifcalledfromwithinafunction,thereturnstatementimmediatelyendsexecutionofthecurrentfunction,andreturnsitsargumentasthevalueofthefunctioncall.引自php手册:http://php.net/manual/en/function.return.php所以如果我要编写这个函数:publicfunctioncheck_db_for_desired_value(){//...connecttodb,preparestmt,etc.while(mysqli_st

php - 如何在 mysqli 中转换 mysql_result?

这个问题在这里已经有了答案:Singleresultfromdatabaseusingmysqli(6个答案)关闭8个月前。这段代码以前在mysql中,现在因为它已被弃用,我决定在mysqli中转换我的代码,但是我在我的页面中遇到了这个问题,在它与mysql一起工作之前没有错误,但是我的页面有分页现在我在这一行中得到一个错误:Warning:mysqli_fetch_assoc()expectsexactly1parameter,2given这个错误很明显,我知道,但我不知道如何用另一种方式来做,因为之前我在那行的代码是$pages=ceil(mysql_result($pages_q

php - Composer 未复制到指定的 bin-dir 目录

我有时会遇到这个问题,在windows、mac、ubuntu上...我有这个composer.json:{"name":"laravel/laravel","description":"TheLaravelFramework.","keywords":["framework","laravel"],"license":"MIT","require":{"laravel/framework":"4.2.*","zizaco/confide":"~4.0@dev","zizaco/entrust":"1.2.*@dev","guzzlehttp/guzzle":"~4.0"},"requi

PHP_PEAR_INSTALL_DIR 设置不正确 - wamp 64bit with php5.3.13

我在php5.5.12中使用wamp64bit。我遵循了所有10个步骤:http://www.tech-recipes.com/rx/29976/install-pear-on-windows-7-64x-using-wamp/实际上安装和路径都没有问题,但是当我尝试通过键入pear来检查pear是否正常工作时,它没有显示命令列表,而是显示了这个:PHP_PEAR_INSTALL_DIRisnotsetcorrectly.Pleasefixitusingyourenvironmentvariableormodifythedefaulvalueinpear.batThecurrentva

javascript - Yii2 和 Ajax : The response is not the SQL query results

我想使用jQuery执行AJAX查询,但响应不是我想要的。客户端:$.ajax({url:"/family?idperson=1234",dataType:'json',success:function(res){console.log(JSON.stringify(res,null,4));},error:function(err){}});服务器端:publicfunctionactionFamily($idperson){$searchModelFamily=newFamilySearch();$dataProvider=$searchModelFamily->searchByI

php - is_dir 即使是目录也返回 false?

为什么is_dir()即使是目录也返回false?没有返回错误$path_mysql='/var/lib/mysql/';if(!is_dir($path_mysql)){echo'error';}返回错误$path_mysql='/var/lib/mysql/domain.com/';if(!is_dir($path_mysql)){echo'error';}/var/lib/mysql/domain.com/确实存在,但is_dir()返回false!?我可以通过PuTTY和WinSCP访问目录 最佳答案 可能是因为它无法检查/

php - CakePHP 3 : Changing structure of result set

我是CakePHP新手,遇到以下问题:我有表“图片”、“关键字”和“关键字类别”。每个图像都可以有多个关键字(多对多),每个关键字都有一个类别(多对一)。使用检索图像列表$images=$this->Images->find()->contain(['Keywords','Keywords.KeywordCategories']);返回这样的结果结构:[{"id":1,"keywords":[{"keyword":"Dog","keyword_category":{"title":"Animal"}},{"keyword":"Cat","keyword_category":{"titl

PHP-我 | find "extension_dir"修改其值后不生效

我想在php脚本中使用curl并在命令行模式下运行它。这是脚本"http://test.com/wp-content/themes/bluefocus/images/desc_img.jpg",CURLOPT_BINARYTRANSFER=>true,CURLOPT_VERBOSE=>true);curl_setopt_array($ch,$options);$data=curl_exec($ch);$fp=fopen("test.jpg","w");fwrite($fp,$data);curl_close($ch);?>我在cmd中使用命令phpget.php运行它错误信息:D:\p