小编Mos*_*she的帖子

如何在php中运行脚本的目录中只获取父文件夹的名称?

我想获得目录中当前运行脚本的父文件夹的名称?

如果我们有一个名为foo.php的脚本,其路径为"/Users/Somone/Sites/public/foo.php",我怎样才能从该文件路径中获取"公共"而不是整个目录树?

任何帮助都会很棒.

谢谢.

php

9
推荐指数
1
解决办法
1万
查看次数

Meteor RangeError:超出最大调用堆栈大小.关于按键事件

我试图建立一个搜索框来筛选我在客户端返回的集合的结果.

但是,当我实际尝试搜索时,我在控制台中收到上述错误.

RangeError: Maximum call stack size exceeded.
Run Code Online (Sandbox Code Playgroud)

这是我的代码.

<body>
{{#isolate}}
 <header class="row-fluid">
  {{> modules}}
 </header>
{{/isolate}}

<div id="main" class="span11">
 {{#if currentUser}}

 {{#isolate}}
  {{> customers_list}}
 {{/isolate}}   

 {{#isolate}}
  {{> contacts_list}}
 {{/isolate}}

 {{/if}}
</div>
</body>
Run Code Online (Sandbox Code Playgroud)

我在模块模板里面的搜索表单

<template name="modules">
 {{templateLogger "modules"}}
  <ul id="module_list" class="nav">
 {{#each list}}
  <li>
   <a href="#" id="module_{{_id}}" module_id="{{_id}}" class="module">{{name}}</a>
  </li>
 {{/each}}
  <form><input type="text" id="search"></form>
</ul>
Run Code Online (Sandbox Code Playgroud)

和我的customers_list模板,我正在尝试过滤结果

<template name="customers_list">
 <table class="table">
  <tr>
   <th>Name</th>
   <th>Address</th>
   <th>City</th>
   <th>State</th>
   <th>Zip</th>
   <th>Phone</th>
  </tr>

 {{#each record}}
  <tr>
   <td>{{name}}</td>
   <td>{{address}}</td>
   <td>{{city}}</td>
   <td>{{state}}</td>
   <td>{{zip}}</td>
   <td>{{phone}}</td>
  </tr>
 {{/each}}
 </table> …
Run Code Online (Sandbox Code Playgroud)

meteor

8
推荐指数
2
解决办法
9568
查看次数

如何将meteor 0.6.0 +部署到heroku

我试图将我的流星0.6.3应用程序部署到heroku我尝试使用https://github.com/jordansissel/heroku-buildpack-meteor.git它只支持流星0.5.9我也尝试在.tgz文件中捆绑我的应用程序正如流星文档所暗示但无法部署我一直检测到没有雪松应用程序?

heroku meteor

4
推荐指数
1
解决办法
3958
查看次数

Meteor Collection.find在动态mongo查询中使用变量作为字段

我试图使用变量作为Collection.find查询中的字段说明符,但山雀只是忽略它

    var qry = "{\"" + field_name + "\":" + field_value + "}"
    console.log(qry)//  {"customer_active":true}
    Customers.find(qry).map(function(customer){// doesn't find anything
        console.log(customer)
        var groups = customer.customer_group_id.push(a._id)

        Customers.update({$set: {customer_group_id: groups}})
    })
Run Code Online (Sandbox Code Playgroud)

如何构建动态查询

mongodb meteor

2
推荐指数
1
解决办法
2462
查看次数

标签 统计

meteor ×3

heroku ×1

mongodb ×1

php ×1