草庐IT

ENV_NAME

全部标签

php - Yii::app()->name 是否缓存在 yii 上?

Yii::app()->name是否缓存在yii上?经常使用它好吗?我决定在我的布局上使用自定义页面标题,并在我的Controller上使用类似这样的东西。$this->pageTitle=Yii::app()->name.":".$action 最佳答案 它不是cached缓存的,但是你想怎么用就怎么用。来自theguide:Theapplicationobjectisinstantiatedasasingletonbytheentryscript.Theapplicationsingletoncanbeaccessedatany

php - 错误通知 : Constant DB_NAME already defined in

我有一个既能显示表单又能验证它的文件。当显示表单时一切正常,但是当我按下提交按钮以验证表单时,这里我得到了错误,尽管表单已经过验证,错误是:notice:ConstantDB_NAMEalreadydefinedinC:\wamp\www\ssiphone\ss-config.phponline15感谢帮助:) 最佳答案 您可能正在使用include或require而不是include_once或require_once.如果声明DB_NAME的文件被多次包含,它会抛出该错误。否则,您的代码中可能只有多个声明。

php - 在 Codeigniter 中设置表单的 'name' 属性

在http://codeigniter.com/user_guide/helpers/form_helper.html引用Codeigniter用户指南,我似乎无法弄清楚如何使用CI的表单助手设置表单的“名称”属性。传入数组只能设置'id',form_open()函数不传数组就可以设置表单的'name'吗? 最佳答案 你可以用这个方法$attributes=array('name'=>'myform');echoform_open('email/send',$attributes); 关

php - Laravel 5.1 Mail::send .env 配置不起作用

我有一个应该发送电子邮件的排队作业。我不断收到错误消息:Swift_TransportException(code:530):Expectedresponsecode250butgotcode\"530\",withmessage\"5305.7.1Authenticationrequired\r\n\"at/my/project/path/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:383我尝试使用mail、sendmail和smtp驱动程序。但是,如果我直接

javascript - html 中真的需要 name 属性吗?

关闭。这个问题不符合StackOverflowguidelines.它目前不接受答案。这个问题似乎不是关于aspecificprogrammingproblem,asoftwarealgorithm,orsoftwaretoolsprimarilyusedbyprogrammers的.如果您认为这个问题是关于anotherStackExchangesite的主题,您可以发表评论,说明问题可能在哪里得到解答。关闭3年前。Improvethisquestion如果HTML表单中的name属性的目的只是为了引用诸如input之类的元素,为什么我们不能简单地使用id或class属性呢?创建名称

php - PDO : Select using a prepared statement returns column name

我正在尝试在准备好列的地方使用准备好的语句即SELECT?FROMusers现在如果我把它正常工作SELECTidFROMusers但是执行第一条语句,值是列名。id=id0=0我做错了什么,或者这可能吗? 最佳答案 不可以,您不能绑定(bind)列名或表名。这里有更多信息EscapingcolumnnamesinPDOstatements 关于php-PDO:Selectusingapreparedstatementreturnscolumnname,我们在StackOverflow上

php - 新手 : throw new exception - can we change exception name?

我正在尝试处理异常(exception)情况。所以我有类似的东西:如果发生不好的事情:thrownewCreateContactException($codigo,$result->msg);稍后,我会尝试,如果不行,捕获:try{createContact();}catch(CreateContactException$e){$error.='Anerroroccurredwiththecode:'.$e->getCode().'andmessage:'.$e->getMessage();}1)这行得通吗?我的意思是,这个getCode()和getMessage()与CreateCo

PHP fatal error : Function name must be a string

关闭。这个问题不符合StackOverflowguidelines.它目前不接受答案。关于您编写​​的代码问题的问题必须在问题本身中描述具体问题—并且包括有效代码以重现它。参见SSCCE.org寻求指导。关闭9年前。Improvethisquestion$img1=$_GET['img1'];$img2=$_GET['img2'];$query=$mysql_query("SELECT*FROMasdWHEREID=$img1");$row1=mysql_fetch_array($query);$query=$mysql_query("SELECT*FROMasdWHEREID=$im

php - WooCommerce 编辑帐户抛出 'display name is a required field' 错误

我在使用WooCommerce编辑帐户页面时遇到问题。提交表单时,显示错误消息“显示名称是必填字段”。我尝试同时添加一个字段inputtype="text"和display_name);?>但尝试添加该字段时运气不佳。我也尝试过使该字段不需要,但我不确定如何使用最新版本的WooCommerce来完成这些操作。 最佳答案 要使其不需要,请使用:add_filter('woocommerce_save_account_details_required_fields','wc_save_account_details_required_f

php - fatal error : Function name must be a string in.。 PHP错误

您好,我有一个名为User的类和一个名为insertUser()的方法。functioninsertUser($first_name,$last_name,$user_name,$password,$email_address,$group_house_id){$first_name=mysql_real_escape_string($first_name);$last_name=mysql_real_escape_string($last_name);$user_name=mysql_real_escape_string($user_name);$password=mysql_rea