草庐IT

call_person

全部标签

IIS 上的 PHP 7 : Call_user_function could not be located

我正在尝试在Windows2012R264位服务器上将MicrosoftSQLServer驱动程序与PHP7.1非线程安全x64一起使用。无论我做什么,当我从管理员命令提示符运行php时,我都会收到错误Warning:PHPStartup:Unabletoloaddynamiclibrary'ext\php_pdo_sqlsrv_7_nts.dll'-Thespecifiedprocedurecouldnotbefound.此外,它还会弹出一个窗口,说明Theprocedureentrypointcall_user_functioncouldnotbelocatedinthedynam

php - 在同一个类中调用 __call 而不是 __callstatic,而不是调用另一个类

我有一个关于奇怪行为的问题。看这段代码:classUser{publicfunctioncan($name){returncall_user_func(array($name,'test'));}publicstaticfunction__callStatic($name,$args){return'User::__callStatic';}publicfunction__call($name,$args){return'User::__call';}}classFoo{publicstaticfunction__callStatic($name,$args){return'Foo::

php - 传递给 myFunction() 的参数 1 必须是 string 的实例,string given, called in

我有这个功能:functionmyFunction(string$name){$db=mysql_connect("localhost","root","");mysql_select_db(...);$insertplayer="INSERTINTO`...`(....)VALUES(......')";if(!mysql_query($insertplayer,$db)){die('Error:'.mysql_error());}$id=mysql_insert_id();echo'doneforplayerN°'.$id;mysql_close($db);}以及我使用的表格:但是

php - 尝试在 Laravel 中的 Application::create() 中使用自定义外观导致 'Call to undefined method'?

我正在尝试为搜索功能创建自己的自定义外观,但遇到了一点困难:type:Symfony\Component\Debug\Exception\FatalErrorExceptionmessage:CalltoundefinedmethodIlluminate\Foundation\Application::create()file:H:\myproj\vendor\laravel\framework\src\Illuminate\Container\Container.phpline:165此错误是由于我的代码命中:Search::indexObject();我的Searchfacade设

php - Laravel 验证 : Call to a member function fails() on null

这段代码几天前还可以工作,但我似乎做了一些事情导致它崩溃了。我有这条路线:Route::post('admin/routemanagement','AdminController@addRoute');看起来像这样:publicfunctionaddRoute(Request$request){if(Auth::check()){$rules=['flightDep'=>'required','flightArr'=>'required','flightDepTime'=>'required','flightArrTime'=>'required',];$messages=['flig

php - Mysqli 更新抛出 Call to a member function bind_param() 错误

这个问题在这里已经有了答案:Whattodowithmysqliproblems?Errorslikemysqli_fetch_array():Argument#1mustbeoftypemysqli_resultandsuch(1个回答)关闭3年前。我有一个70/80的字段表单,我需要将其插入到一个表中,所以我没有手动创建一个巨大的插入语句,而是首先根据表单中的输入名称在我的数据库中创建了一个表,这里是代码我用来创建/更改表的functioncreateTable($array,$memberMysqli){foreach($arrayas$key=>$value){//echo"K

php - 相对命名空间和 call_user_func()

代码胜于Eloquent:namespaces.php:namespace_test.php:如评论所述,如果我在call_user_func()中使用完全限定名称,它会按预期工作,但如果我使用相对namespace,它会说找不到该类——但直接实例化有效。我是不是遗漏了某些东西或它的设计怪异? 最佳答案 您必须在回调中使用完全限定的类名。参见Example#3call_user_func()usingnamespacename我相信这是因为call_user_func是一个来自全局范围的函数,也从全局范围执行回调。不管怎样,请看第一

php - 如果 call_user_func 应该返回 false 怎么办?

我用call_user_func调用的函数应该返回FALSE。那么,如果可调用对象无效,我该如何检测错误呢?(旁注:为什么他们没有抛出异常而不是返回错误代码?或者有没有办法“捕获”错误?我有一个错误句柄。我应该让它为我抛出异常吗?) 最佳答案 如果要检查要调用的函数或方法是否真的存在,可以使用is_callable在打电话之前call_user_func.您可以将整个内容包装在一个函数中以便于重用:functioncall_uf($fn){if(is_callable($fn)){returncall_user_func($fn);

php - 错误 : "Object reference not set to an instance of an object" when calling SOAP cilent in PHP

这里是wsdl的数据这是我的尝试代码$client=newSoapClient("http://demo/demo.asmx?wsdl",array('trace'=>1,"exception"=>0));$data=array('formId'=>1,'LocationId'=>1,'FirstName'=>'test','LastName'=>'test','MobilePhone'=>11111111,'email'=>'test@test.com','AllowEmail'=>0,'Region'=>'HK','LeadSourceId'=>11,'Questions'=>ar

php - 在 PHP 7.0 中 fatal error : Uncaught Error: Call to undefined function json_encode()

我的服务器配置:[root@server~]#php-vPHP7.0.22(cli)(built:Aug7201716:18:27)(NTS)[root@server~]#nginx-vnginxversion:nginx/1.10.2操作系统:CentOS7.3.1611(核心)我的YUM安装详情:[root@server~]#yumlistinstalled|grepphpphp70u-cli.x86_647.0.22-2.ius.centos7@iusphp70u-common.x86_647.0.22-2.ius.centos7@iusphp70u-fpm.x86_647.0.