草庐IT

non-directory

全部标签

php - Windows 更新警告 : Unknown: failed to open stream: No such file or directory in Unknown on line 0

Warning:Unknown:failedtoopenstream:NosuchfileordirectoryinUnknownonline0Fatalerror:Unknown:Failedopeningrequired'C:/School/OneDrive-Noorderpoort/PHP/htdocs/Jaar1/Blok1/Les7/oefening16.php'(include_path='C:\xampp\php\PEAR')inUnknownonline0经过长时间的Windows更新后,当我尝试通过本地主机打开php文件时突然出现此错误。我该如何解决这个问题?

php - Zend 框架 (1.7.5) : how to change controller directory

使用ZendFramework我想使用存储在非默认目录中的Controller。我想要实现的是,如果请求的路径以admin/controllers/admin开头,则使用layout/admin和views/admin等。我将如何以合理优雅的方式实现这一目标? 最佳答案 $front=Zend_Controller_Front::getInstance();$front->setControllerDirectory(...path...);或多个路径$front=Zend_Controller_Front::getInstance

PHP-REGEX : accented letters matches non-accented ones, 反之亦然。如何做到这一点?

我想做典型的高亮代码。所以我有类似的东西:$valor=preg_replace("/(".$_REQUEST['txt_search'].")/iu","\\1",$valor);现在,请求词可能类似于“josé”。有了它,我还想突出显示“jose”或“JOSÉ”或“José”等。对于这个表达式,如果我写“josé”,它会匹配“josé”和“JOSÉ”(以及所有大小写变体)。它始终只匹配重音变体。如果我搜索“jose”,它会匹配“JOSE”、“jose”、“Jose”,但不匹配重音符号。所以我部分满足了我的要求,因为我对重音和非重音分别不区分大小写。我需要它完全结合,这意味着重音(u

PHP 'non-object' 错误

这个问题在这里已经有了答案:Calltoamemberfunctiononanon-object[duplicate](8个答案)关闭9年前。我正在使用PHP编写一个小型MVC框架来进行练习。然而,PHP似乎不喜欢我的Controller类。该类包含加载View的加载器实例:abstractclassController{public$load;function__construct($load){$this->load=$load;}abstractpublicfunctionindex();}从那里,我可以覆盖我所有Controller的Controller。例如,我的索引Cont

php - .htaccess 重写规则 : two domains using same server and directory

作为背景知识,我们有两个域:mydomain.commydomain.czmydomain.cz指向mydomain.com的服务器并使用相同的目录。我们在.htaccess(两个域共享)中有一个RewriteRule,如下所示:RewriteRule^([0-9]+)/?$project.php?id=$1[NC,L]#HandleprojectrequestsRewriteRule^([0-9]+)/?$project_cz.php?id=$1[NC,L]#Handleprojectrequests此RewriteRule在使用来自mydomain.com/project.php?

php - ( fatal error : Call to a member function bind_param() on a non-object)

这个问题在这里已经有了答案:Whattodowithmysqliproblems?Errorslikemysqli_fetch_array():Argument#1mustbeoftypemysqli_resultandsuch(1个回答)关闭4个月前。我收到此文本的错误:(抱歉我的英语不好,我来自德国!)错误:fatalerror:在第44行/users/ftf/www/ccache.php中的非对象上调用成员函数bind_param()部分代码来自ccache.php//NeuesDatenbank-Objekterzeugen$db=@newmysqli('localhost',

php - ReflectionException "Cannot access non-public member",但属性可访问?

我正在以这种方式更改我的反射类的可访问标志:protectedfunctiongetBaseSubscriptionPeriodReflection(){$reflection=new\ReflectionClass('Me\Project\Class');//Makeallprivateandprotectedpropertiesaccessible$this->changeAccessibility($reflection,true);return$reflection;}protectedfunctionchangeAccessibility(\ReflectionClass$r

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 - 检查目录路径是否以 DIRECTORY_SEPARATOR 结尾

在PHP中,我从用户那里接收到本地文件目录$path的字符串我想知道他们是否包含尾部斜杠(/)。我希望这是跨平台的,所以我想使用PHP常量DIRECTORY_SEPARATOR我失败的尝试包括尝试像preg_match("/".DIRECTORY_SEPARATOR."$/",$path);我基本上只是想要一种优雅的方法来测试字符串是否以DIRECTORY_SEPARATOR结尾。 最佳答案 修复正则表达式:preg_match("/".preg_quote(DIRECTORY_SEPARATOR)."$/",$path);但可能有

php - 发生客户端错误 : Could not create storage directory:/tmp/Google_Client/00

此错误对YoutubeAPIv3.0意味着什么:Aclienterroroccurred:Couldnotcreatestoragedirectory:/tmp/Google_Client/00我在Google的文档中使用PHPYoutubeAPI找到here. 最佳答案 我在不更改GoogleAPI的任何行的情况下解决了这个问题。在您的PHP代码中,您只需要指定缓存文件夹所在的位置:$config=newGoogle_Config();$config->setClassConfig('Google_Cache_File',arra