为什么需要使用substr php函数转义:Slim index.php路由参数中的冒号
当我使用php函数substr($id,1)转义参数冒号(:id)时,我的细长路径(index.php)只将数据返回到angular(app.js) 当我注释substr函数时,返回值为false,因为冒号在参数id之前 为什么会这样 app.js(角度) index.php(slim)为什么需要使用substr php函数转义:Slim index.php路由参数中的冒号,php,angularjs,rest,slim,Php,Angularjs,Rest,Slim,当我使用php函数substr($id,1)转义参数冒号(:id)时,我的细长路径(index.php)只将数据返回到angular(app.js) 当我注释substr函数时,返回值为false,因为冒号在参数id之前 为什么会这样 app.js(角度) index.php(slim) 我在html href上发现了问题: 以前 <a class="text-link" href="#/product/:{{vinho.id}}" ><h4>{{vinho.userna
我在html href上发现了问题: 以前
<a class="text-link" href="#/product/:{{vinho.id}}" ><h4>{{vinho.username}}</h4></a>
在我使用带冒号的ng href之后
<a class="text-link" ng-href="#/product/{{vinho.id}}" ><h4>{{vinho.username}}</h4></a>
<a class="text-link" href="#/product/:{{vinho.id}}" ><h4>{{vinho.username}}</h4></a>
<a class="text-link" ng-href="#/product/{{vinho.id}}" ><h4>{{vinho.username}}</h4></a>