我在PHP中为websockets 设置了Ratchet.它使用(ws:// localhost:8080)从我的javascript客户端正常连接并成功发送/接收消息.但我想传递一些参数(ws:// localhost:8080?param1 = value).我无法弄清楚如何在PHP脚本中访问param1.
如果可能,在MessageComponentInterface :: onOpen(ConnectionInterface $ conn)方法中.
或者更好:我可以将这些参数与ConnectionInterface $ conn相关联.所以我让他们进行进一步的沟通.
我正在尝试根据内容以及它的兄弟容器和父容器来调整文本视图的大小.
下面的代码在iOS 6中正常运行
if (/* less than ios 7 */) {
CGRect frame = _textView.frame;
CGSize conSize = _textView.contentSize;
CGFloat difference = conSize.height - frame.size.height;
frame.size.height += difference;
_textView.frame = frame;
UIScrollView *parentView = (UIScrollView *)_textView.superview;
// adjust views residing below this text view.
// sibling view
UIView *belowView = // access it somehow
CGRect frame1 = belowView.frame;
frame1.origin.y += difference;
belowView.frame = frame1;
// adjust parent scroll view, increase height.
CGSize frame3 = parentView.contentSize;
frame3.height += difference;
parentView.contentSize = …Run Code Online (Sandbox Code Playgroud)