草庐IT

call_count

全部标签

php - 错误 : Call to a member function find() on a non-object in cakephp controller

我是cakephp的新手,并尝试使用控制台工具生成一些CRUD操作。它工作正常,除了一张table(最大的)。尝试添加新元素时,返回:Error:Calltoamemberfunctionfind()onanon-objectFile:C:\wamp\www\cakephp\app\Controller\ChantiersController.phpLine:50这是第50行及以后的代码:$programs=$this->Chantier->Program->find('list');$etats=$this->Chantier->Etat->find('list');$types=$

php - fatal error : call to undefined function mb_strtolower() in OpenCart

这个问题在这里已经有了答案:Fatalerror:Calltoundefinedfunctionmb_strtolower()(4个答案)关闭8年前。我正在使用opencart1.5.6这周我遇到了一次严重的服务器崩溃,不得不对服务器进行镜像恢复。现在一切都恢复正常,除了现在在opencart中,当我尝试以客户身份登录或去结账时,我收到此错误并且不知道如何解决它。SyntaxError:JSON.parse:unexpectedcharacteratline1column1oftheJSONdataFatalerror:Calltoundefinedfunctionmb_strtolo

php - Uncaught Error : Call to undefined function mysql_select_db()

我正在尝试从数据库中获取数据,但出现此错误。Fatalerror:UncaughtError:Calltoundefinedfunctionmysql_select_db()inE:\xamp\htdocs\PoliceApp\News\fetch.php:10Stacktrace:#0{main}throwninE:\xamp\htdocs\PoliceApp\News\fetch.phponline10我怎样才能做到这一点? 最佳答案 应该是mysqli_select_db($dbhandle,"police")其他mysql_

php - WordPress - PHP fatal error : Call to undefined function get_bloginfo()

我正在将一个外部脚本与我的wordpress主题集成,但我在我的一个文件中遇到了这个错误:PHPFatalerror:Calltoundefinedfunctionget_bloginfo()这个脚本位于themes/mytheme/myscript所有文件包含如下:include(WP_CONTENT_DIR."/themes/mytheme/myscript/myfile.php");我该如何解决? 最佳答案 问题通常与mysql相关...您需要重置您的wordpress数据库用户密码。也就是说wordpress数据库用户的pa

php - ZF2 : Return JSON only for Ajax Call

我正在努力学习ZF2。我有一个使用Ajax获取一些数据的页面。ZF2函数应返回一个JSON字符串。'SomeTitle'));return$json;}}但我一直收到这个fatalerror:(!)Fatalerror:Uncaughtexception'Zend\View\Exception\RuntimeException'withmessage'Zend\View\Renderer\PhpRenderer::render:Unabletorendertemplate"application/documents/get-tree-data";resolvercouldnotreso

php - "Call-time pass-by-reference has been removed"

我正在尝试使用此存储库在Dotcloud上部署Wordpress,但日志中出现错误:18:59:19:[www.0]Runningpostinstallscript...18:59:21:[www.0]PHPFatalerror:Call-timepass-by-referencehasbeenremovedin/home/dotcloud/rsync-1353715101184/dotcloud-scripts/feed-wp-config.phponline86查看line86infeed-wp-config.php,内容如下:$content=preg_replace('/(de

php - WordPress 错误 : Call to undefined function in plugin

我一直在使用ShortcodeExecPHP插件编写一个函数,当我在编辑器中运行该函数时效果很好。当我将它移动到插件时,我开始在日志中看到如下错误:PHPFatalerror:Calltoundefinedfunctionwp_create_category()我意识到这是因为缺少包含等。为插件包含内置wordpress功能的正确方法是什么?我的插件使用了以下wordpress函数wp_create_categoryusername_existswp_generate_passwordwp_create_userwp_insert_postupdate_post_metaadd_pos

php - 用于分页的 Codeigniter count_all

我正在尝试在codeigniter中创建分页,并且可以正常工作,但我遇到了一个小问题。它似乎正在加载我数据库中的所有条目,而不是我想要的选定条目。publicfunctionoriginal_count(){$this->db->where('type','Original');return$this->db->count_all("story_tbl");}我知道发生的事情是最后一行压倒了我之前的陈述。我似乎无法找到解决方法。我只尝试了一个直接的sql语句然后返回它,但我也无法让它工作。这是我的声明...SELECTCOUNT(*)FROMstory_tblwheretype='Or

php - fatal error : Call to undefined function easter_date()

我正在尝试获取今年的easter_date。这是我的代码:当我执行代码时出现以下错误:fatalerror:在中调用未定义的函数easter_date()我的php版本是5.3.3。我正在使用Linux(Ubuntu)。您知道缺少什么吗? 最佳答案 如果您使用基于php:7.1的Dockerfile,您可以轻松安装calendar扩展:RUNdocker-php-ext-installcalendar&&docker-php-ext-configurecalendar 关于php-fat

PHP:有没有办法调用不区分大小写的 substr_count()?

正如问题所说:有没有办法调用大小写不区分substr_count()? 最佳答案 没有原生方法,你可以这样做:substr_count(strtoupper($haystack),strtoupper($needle));你当然可以把它写成一个函数:functionsubstri_count($haystack,$needle){returnsubstr_count(strtoupper($haystack),strtoupper($needle));}在使用大小写更改来比较字符串时,请注意火鸡测试。http://www.moser