草庐IT

class-names

全部标签

php - fatal error : Class 'SELF' not found

我有以下相关代码:try{self::$db=newPDO($dsn,self::USER,SELF::PASS);//Connecttothedatabase,andstorethepdoobject.self::$db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);}catch(PDOException$e){thrownewException("Therehavebeenanerrorintheconnection:".$e->getMessage());}执行此代码所在的静态函数时,出现以下错误:Fatalerr

php - Laravel 4 迁移 : class not found exception

很明显,当我想迁移我的数据库时,我得到了这个奇怪的错误{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class''notfound","file":"C:\\xampp\\htdocs\\l4crm\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Migrations\\Migrator.php","line":301}}[Finishedin1.3s]过去当然一切正常,我尝试迁移哪些文件并不重

php - 将 2 个正则表达式合并为一个时得到 "two named subpatterns have the same name"

我试图将2个具有相同名称的不同正则表达式合并为一个,但得到的错误消息如下:Warning:preg_match():Compilationfailed:twonamedsubpatternshavethesamenameatoffset276...一个正则表达式如下所示:'%[\s\S]*?(?P[\s\S]*?)%'另一个看起来像这样:'%[\s\S]*?(?P[\s\S]*?)%'我可以毫无问题地按以下方式组合它们:'%([\s\S]*?(?P[\s\S]*?)|[\s\S]*?(?P[\s\S]*?))%'但我不喜欢这种方式,因为我使用了2个名字。我想知道是否有更好的方法来解决这

php - 文件()[函数.文件] : php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

从文件("http://www.otherdomain.com")获取内容时出现以下错误。file()[function.file]:php_network_getaddresses:getaddrinfofailed:Temporaryfailureinnameresolution域服务器是linux。如何解决这个问题? 最佳答案 引用:Ifyou'rehavingproblemswithfopen("url...")butyoucanrun'hosturl'inashellwindowandgetthecorrectlookup

php - 向类(class) Moodle 添加自定义字段

关闭。这个问题需要更多focused.它目前不接受答案。想改进这个问题吗?更新问题,使其只关注一个问题editingthispost.关闭2年前。Improvethisquestion我是moodle的新手。我需要您的建议来创建插件,该插件将在添加/编辑类(class)页面上添加自定义字段,并将输入值存储在mdl_course表中。

php oci_bind_by_name float

我需要将float绑定(bind)到OCI语句。我在做什么:$price=0.1oci_bind_by_name($resource,'price',$price);在我的Oracle数据库中,“价格”是存储过程的一个参数,它的类型是NUMERIC。执行语句后出现以下错误:Message:oci_execute()[function.oci-execute]:ORA-06502:PL/SQL:numericorvalueerror:charactertonumberconversionerrorORA-06512:atline1如果$price是一个整数,一切正常。在PHP文档中htt

php - Symfony2 : "Fatal error: Class service..." while trying to include a class as an service in config. yml (TCPPDF)

我正在尝试在Symfony2(2.1.4-DEV)中使用服务容器包含类TCPDF的扩展。为此,我编辑了symfony/app/config/config.yml:services:extend_pdf:class:Acme\VSBundle\extend_pdf在文件symfony/src/Acme/VSBundle/extend_pdf.php中,我有一个像这样的虚拟类:我将其加载到Controller中,例如:functiontestAction(){$extendpdf=$this->get('extend_pdf');returnnewResponse('success');}

php - Opcache 导致 PHP fatal error : Class '\xa0L\xdaor\x7f' not found

我们网站上的图像大小调整脚本有时会失败并出现以下错误:PHPFatalerror:Class'\xa0L\xdaor\x7f'notfound...online4有问题的脚本的实际第4行是:$photo=newPhoto($photo_id);我不知道错误日志中的十六进制代码\xa0L\xdaor\x7f来自哪里。该脚本将运行良好,并且相对频繁地运行一两天,然后每次都开始失败,并出现该错误。如果我运行opcache_reset(),错误就会停止。有人知道是什么导致了这个问题吗?更新:我没有得到任何回应-所以我只是使用opcache.blacklist_filename从操作码缓存中排除

php - curl 错误 (35) : error:14077458:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 unrecognized name

我一直在使用以下代码块通过cURL从HTTPS网站收集数据。$q='https://www.example.org/';//forexample$ch=curl_init();curl_setopt($ch,CURLOPT_URL,$q);curl_setopt($ch,CURLOPT_RETURNTRANSFER,TRUE);curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,0);curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);curl_setopt($ch,CURLOPT_FOLLOWLOCATION,TRUE

php - "Object named IIS_IUSRS could not be found"将用户添加到 PHP session 目录 iis 8

我正在运行运行IIS8的WindowsServer2012R2。整个WindowsServer环境的新功能。要安装PHP,我将遵循以下教程InstallandConfigurePHP其中一部分说,为了正确使用PHP的session功能,我需要创建一个新文件夹“sessions”并将“IIS_IUSRS”添加到该文件夹​​。但是,当我在“对象文件框”中输入相同内容时,出现“未找到名为IIS_IUSRS的对象”错误。到目前为止,我已经提到了以下内容,但没有一个有帮助TryingtoaddIIS_IUSRStoAdministratorsgroup[closed]IISorIIS_IUSRS