草庐IT

stream-builder

全部标签

php - Telegram + PHP (Windows 7) : failed to open stream: HTTP request failed! HTTP/1.1 404 未找到

我正在尝试迈出Telegram的第一步,我也是PHP的新手......我已经在我的Windows7电脑上配置了带有PHP5.6.14和SSL的Apache2.4,它在http和https中运行良好。然后我尝试遵循此TelegramBot教程https://www.youtube.com/watch?v=hJBYojK7DO4.一切正常,直到我不得不创建一个像这样的简单PHP程序时";$website="https://api.telegram.org/bot".$botToken;$update=file_get_contents($website."/getUpates");prin

php - 调用未定义的方法 Illuminate\Database\Query\Builder::notify() Laravel 5.4

我正在使用Laravel5.4得到上面的errorCalltoundefinedmethodIlluminate\Database\Query\Builder::notify()我遇到过这个解决方案YoumustaddIlluminate\Notifications\NotifiabletraitinUsermodel.(link:CalltoundefinedmethodIlluminate\Database\Query\Builder::notify())即使它不适合我下面是我的Usermodel我还没有为models创建任何文件夹,它的路径是默认的hasMany('App\Pro

php - 请求 stream_tag 表

我正在尝试使用应用程序的phpapi请求stream_tagfacebook表SELECTpost_id,actor_id,target_idFROMstream_tagWHEREtarget_id=me()它只给我10个结果。我怎样才能获得真正的所有结果?我得到了所有这些许可:emailuser_about_meuser_birthdayuser_hometownuser_locationuser_statusfriends_about_mefriends_statusread_streamread_insights 最佳答案 F

php - PHP : The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect 中的 FreeTDS 错误

我必须使用ODBC从ArchLinux连接到MSSQL服务器。我使用FreeTDS,并使用isql,它可以正常工作:isqlsqlexpressdev开发但不是在PHP中。我在交互模式下使用PHP:PHP>$conn=odbc_connect("sqlexpress",'dev','Dev');PHP>$a=odbc_exec($conn,'SELECT*FROMmeasures;');PHPWarning:odbc_exec():SQLerror:[FreeTDS][SQLServer]Theincomingtabulardatastream(TDS)remoteprocedurec

php - Yii 框架 :Form builder

如何使用Yii中的表单生成器创建表单?它的数据模型是什么? 最佳答案 Howtomakeaformbuilderinyiiframework?UsingFormBuilderTheYiiformbuilderusesaCFormobjecttorepresentthespecificationsneededtodescribeanHTMLform,includingwhichdatamodelsareassociatedwiththeform,whatkindofinputfieldsthereareintheform,andhow

php - 如何检测 stream_copy_to_stream 错误?

我有一些代码,简化后看起来像这样:$fout=fsockopen($host,80);stream_set_timeout($fout,10*3600);//10hours$fin=fopen($file,'rb');//notreallyafilestream,butgoodenoughproxyhere$readbytes=stream_copy_to_stream($fin,$fout);if(!$readbytes)die('copyfailed');但是,我有时会遇到以下类型的错误:Notice:stream_copy_to_stream():sendof952bytesfa

php - GAE、PHP 和 GCM : failed to open stream: HTTP request failed! HTTP/1.0 405 方法不允许

我正在开发一个Web应用程序(使用适用于PHP的GAE),它会在某些内容可供下载时通知Android客户端(通过GCM-GoogleCloudMessaging)。下面的PHP脚本应该可以完成工作:$json=array('data'=>array(...),'registration_ids'=>array(...));$data=json_encode($json);$context=array('http'=>array('method'=>'post','header'=>'Authorization:key=MY_SECRET_KEY'."\r\n".'Content-Typ

php - Doctrine DBAL Query Builder 缺少 insert() 方法

我觉得有那么一刻我错过了一些小东西;我在DotrineDBAL2.2.x/2.3.x上的QueryBuilder组件上使用insert()方法时遇到问题。我做了一些调查,这是来自QueryBuilderpagefromtheDBALDocumantation的片段The\Doctrine\DBAL\Query\QueryBuildersupportsbuildingSELECT,INSERT,UPDATEandDELETEqueries.Whichsortofqueryyouarebuildingdependsonthemethodsyouareusing.它继续解释代码示例,这样我就

php - 如何获得 facebook 应用程序的 publish_stream 权限?

我有一个已经运行了一段时间的应用程序,它只请求了一些用于登录目的的帐户信息。现在我想用它来发布到流。我已将publish_stream添加到req_perms,但它仍然没有请求该权限。我错过了什么吗?FACEBOOKAPPID,'secret'=>FACEBOOKSECRET,'cookie'=>false,));$fb_session=$facebook->getUser();$fb_me=null;//SessionbasedAPIcall.if($fb_session){try{$fb_uid=$fb_session;$fb_me=$facebook->api('/me');$f

php - Laravel Eloquent/Query Builder 中 LEFT JOIN 的 ON 子句中的参数化查询绑定(bind)

假设我想显示带有type="color"的完整奖项列表:AwardsType2013Winner=====================BlueAwardcolorTomRedAwardcolorGreenAwardcolorDan为了实现这个结果,我可以像这样在Laravel中进行查询:$year='2013';$awards=DB::table('awards')->leftJoin('winners',function($join)use($year){$join->on('awards.id','=','winners.award_id');$join->on('winner