我有这个vhost conf
server { # php/fastcgi
listen 80;
server_name trinityplex.com www.trinity.com;
error_log /home/web/trinity_web/log/error.log;
access_log /home/web/trinity_web/log/access.log;
root /home/web/trinity_web/public;
location / {
index index.html index.htm index.php;
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}
}
Run Code Online (Sandbox Code Playgroud)
当我重新启动nginx时它会转储
nginx的开始:2011年4月16日18时56分34秒[EMERG] 2492#0:在/usr/local/nginx/sites-enabled/trinityplex.com:14 "fastcgi_pass" 指令的参数数目无效
我有问题仍然困扰我js oop - 我确定我做得不好,但我不能得到如何正确做到这一点.
例如,我有这个代码
Auth.prototype.auth = function () {
var request = new XMLHttpRequest();
request.open('GET', this.getAuthServerURL() + '/token', true);
request.send();
request.onloadend = function () {
var response = JSON.parse(request.responseText);
console.log(response);
if(response.result == 'found') {
var token = response.token;
this.setToken(token);
this.isSigned = true;
} else {
console.log('Not logged yet.');
}
}
}
Run Code Online (Sandbox Code Playgroud)
问题是我无法从"request.onloadend"函数的上下文访问函数setToken - 这可能是因为我丢失了对"this"的引用.
这是什么问题的解决方案?我可以以某种方式将"this"var传递给此函数的上下文吗?
谢谢!
我有这个nginx vhost文件
server { # php/fastcgi
listen 80;
server_name trinityplex.com www.trinity.com;
access_log /home/web/trinity_web/log/access.log;
root /home/web/trinity_web/public;
location / {
index index.html index.htm index.php;
}
}
Run Code Online (Sandbox Code Playgroud)
(对于域trinityplex.com),但是如果我去trinityplex.com nginx显示我502 Bad gateway并抛出索引文件 - chrome下载index.php就像正常下载一样.
这是荒谬的,我从未见过.如果我问PHP版本它转储
PHP 5.3.5-0.dotdeb.0 with Suhosin-Patch (cli) (built: Jan 7 2011 00:30:52)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
Run Code Online (Sandbox Code Playgroud)
你有任何想法如何解决这个问题?
这是一个nginx cofig文件
user root;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types; …Run Code Online (Sandbox Code Playgroud) 我需要 Github API 方面的帮助,
我需要通过 api 提交新版本的文件,我试图通过向
https://api.github.com/repos/:username/:repo:/git/commits/
Run Code Online (Sandbox Code Playgroud)
有数据
{
"login": "username",
"token": "auth_token",
"parent_commit": "sha",
"message": "commit message.",
"content": {
"path": "full/path",
"mode": "edit",
"data": "new content"
}
}
Run Code Online (Sandbox Code Playgroud)
但结果失败 - 未找到。
有没有人知道在哪里发送这个请求以及这种格式是否正确?
(格式的灵感来自 - http://swanson.github.com/blog/2011/07/23/digging-around-the-github-api-take-2.html)
谢谢!
我有使用JQuery UI Tabs的大型Web应用程序.在中央JS文件中,我已经设置了所有标签.
运用
$("#tabs").tabs;
但是在一个页面上我需要选择另一个选项卡而不是第一个.
如果我使用
$("#tabs").{ selected: add });
(标签名称是#add)
它没有运行,可能是因为Tabs已经设置好了.
如果标签已经打开,有没有人知道如何设置打开另一个而不是第一个选项卡(在默认状态 - 加载页面后)?
我希望,你会理解,我的英语非常可怕.
我需要做那样的事情
class Foo
define perform()
puts 'hello'
end
end
classname = 'Foo'
instance = create_instance(classname)
instance.perform();
Run Code Online (Sandbox Code Playgroud)
这样的事情是可能的.如果是这样的?
非常感谢!
我正在逆向工程一个神奇的脚本。我有一个ug lified源代码和uglifyjs生成的源映射。
有人知道有什么直接的方法可以从中获得至少部分可读的源代码吗?我发现了一些晦涩的方法,包括通过多种语言进行转换,但我希望能有更好的方法。
谢谢!