草庐IT

FUNCTION_NAME

全部标签

php - ON CONFLICT 使用 pg_prepare() 错误 'name' 不存在

我有一个使用此方法的简单数据库类function__construct($host,$user,$pass,$db){$this->link=pg_connect("host=$hostport=5432dbname=$dbuser=$userpassword=$pass")or$this->error();}publicfunctionrun($sql,$args=null){if(!$args)$this->query=pg_query($sql);else{$v=md5(uniqid(mt_rand(),true));$this->query=pg_prepare($v,$sql

php - 我应该如何处理消息 "Deprecated: Function eregi() is deprecated..."?

我在我的网站上看到以下消息,我该怎么办?Deprecated:Functioneregi()isdeprecatedinD:\wamp\www\cidoc.gov.mz\modules\mod_swmenupro\functions.phponline2542 最佳答案 这里是弃用函数和替换函数的列表FunctionreplacementsPOSIXPCREereg_replace()=>preg_replace()ereg()=>preg_match()eregi_replace()=>preg_replace()eregi()=

php - JS : Changing this function to handle a link click

按照这里的例子VerySimplejQueryandPHPAjaxRequest–Readytousecode我已经成功地创建了一个下拉列表,该列表将值传递给外部PHP脚本并将HTML输出返回到同一页面上的“div”,并​​且效果很好。我现在想做的是在单击链接时发布值,而不是构建下拉列表。所以...如果我创建了这个链接:RouteNumber2我想将“2”传递给该外部PHP脚本,并更改​​“div”上的内容,因为它当前与下拉列表一起使用。我不知道如何更改javascript来处理这个或者“foo.php”真正需要的是什么。这是该示例中的当前javascript:$(document).

php - 将模型名称作为函数中的参数传递并使用其方法,如 "$this-> $model_name->method()"codeigniter

我如何创建一个方法来用特定模型填充读取特定表格的下拉列表,然后获取该表格的特定列来填充下拉列表?例如,如果我有一个模范人物我有functionget_all_id($id,$table){$this->db->from($table);$this->db->order_by($id,"asc");$q=$this->db->get();return$q;}然后,如果我需要填写一个带有姓氏字段的下拉列表...我会将其用作$this->load->model('person_model');$row=$this->person_model->get_all_id('id_person','

php - 在函数中返回 parent::function

classTestextendsParent{$a=1;publicfunctionchangeVarA(){$a=2;returnparent::changeVarA();}}谁能解释一下returnparent::function();它的作用是什么?谢谢...!;D 最佳答案 这将调用父类中的函数changeVarA。当一个类扩展另一个类,并且两者具有相同的函数名称时,parent::调用会强制调用和使用该函数的父版本。它的返回部分将简单地返回父函数完成后返回的任何内容:example();?>输出:HelloWorldHel

php xmlParsePITarget : invalid name prefix 'xml' error

有人能帮我理解(并修复这个错误)吗?错误如下:警告:simplexml_load_file():/home/jeffreycwitt/webapps/lombardpress_instances/petrusplaoul/lombardpress/phpfunctions/../../projectfiles/GitTextfiles/lectio1/lectio1.xml:2:解析器警告:xmlParsePITarget:home/jeffreycwitt/webapps/lombardpress_instances/petrusplaoul/lombardpress/phpfunc

php - 交响乐 2 错误 : Call to a member function get() on a non-object

我查找了一些解决方案,但没有找到适合我的问题。在一个Controller中我创建另一个Controller的实例//Controller1$mailController=newMailController();$mailController->newCommentMail($entity,$em);我想在MailController中生成一个URL并发送一封电子邮件$url=$this->generateUrl('path',array('turnId'=>$data->getPoi()->getId(),'poiId'=>$data->getPoi()->getTurn()->get

php - fatal error : Call to undefined function asset() in C:\wamp\www\laravel-master\app\views\hello. PHP

我想学习laravel框架。我可以在我的网络服务器(Wamp)中安装laravel,我得到了一些学习它的教程,但是当我尝试将样式添加到hello.php文件中的“h1”标签时,位于该路径中:(“C:\wamp\www\laravel-master\app\views\hello.php")通过asset()函数,出现上述错误。请帮我找出问题所在。这是hello.php代码:body{margin:0;font-family:'Lato',sans-serif;text-align:center;color:#999;}.welcome{width:300px;height:200px;

php - fatal error : Call to undefined function mb_strtolower(): enable mbstring on linux EC2

我已经通过sudoyuminstallphp-mbstring在我的带有php5.6.17的linuxEC2实例上安装了mbstring。我怎样才能启用它? 最佳答案 需要使用yuminstallphp56-mbstring。安装后,无需配置,只需重启httpd服务即可 关于php-fatalerror:Calltoundefinedfunctionmb_strtolower():enablembstringonlinuxEC2,我们在StackOverflow上找到一个类似的问题:

php - Twig_Error_Syntax : Unknown "template_from_string" function. 函数已过时?

我记得在composer更新后我遇到了这个错误,但之前它运行良好,并且在比较包版本时我没有发现差异。我在模板中以这种方式使用它:{{include(template_from_string(page.body))}}其中“页面”是来自Controller的实体对象。当前版本是:symfony/symfonyv2.8.15twig/extensionsv1.4.1twig/twigv1.30.0同样在config.yml中:twig:debug:"%kernel.debug%"strict_variables:"%kernel.debug%"form_themes:-'AppBundle