本文整理汇总了PHP中app\Project::getUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Project::getUrl方法的具体用法?PHP Project::getUrl怎么用?PHP Project::getUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Project
的用法示例。
在下文中一共展示了Project::getUrl方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4 && xhttp.status == 200) {
if (xhttp.responseText) {
modelSelectEl.removeAttr('disabled');
modelSelectEl.empty().append(xhttp.responseText);
}
}
};
xhttp.open("GET", "<?php
echo \App\Project::getUrl('product/model/');
?>
" + brandId, true);
xhttp.send();
};
</script>
</div>
<?php
} else {
?>
<span>Trebuie sa fi conectat pentru a putea adauga produse.</span>
<a href="<?php
echo \App\Project::getUrl('security/login');
?>
">Conectare.</a>
<?php
}
?>
</div>
示例2: switch
<div class="product_logo">
<?php
$imgSrc = \App\Project::getUrl('app/resources/images/default-product.jpg');
?>
<?php
switch ($product->getName()) {
case 'Alternator':
$imgSrc = \App\Project::getUrl('app/resources/images/products/alternator.jpg');
break;
case 'Bara spate':
$imgSrc = \App\Project::getUrl('app/resources/images/products/bara-spate.jpg');
break;
case 'Bancheta':
$imgSrc = \App\Project::getUrl('app/resources/images/products/bancheta-spate.jpg');
break;
}
?>
<img width="200px" src="<?php
echo $imgSrc;
?>
">
</div>
<div class="product_info">
<div class="product_name">
Nume: <?php
echo $product->getName();
?>
</div>
示例3:
?>
<div class="error">
<?php
echo $error;
?>
</div>
<?php
}
?>
<form action="<?php
echo \App\Project::getUrl('security/login');
?>
" method="post">
<div class="control">
<input type="text" name="email" value="" placeholder="Email">
</div>
<div class="control">
<input type="password" name="password" value="" placeholder="Parola">
</div>
<input type="submit" value="Conectare">
</form>
<div class="register-block">
<span>Nu ai un cont?</span>
<a href="<?php
echo \App\Project::getUrl('user/register');
?>
">Inregistreaza-te</a>
</div>
</div>
</div>
示例4: redirectTo
public function redirectTo($url)
{
header('Location: ' . Project::getUrl($url));
die;
}
示例5:
<!DOCTYPE html>
<head>
<title><?php
echo $this->getTitle();
?>
</title>
<link rel="icon" href="<?php
echo \App\Project::getUrl('app/resources/images/favicon.ico');
?>
" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<?php
echo \App\Project::getUrl('app/resources/bootstrap-3.3.6-dist/css/bootstrap.min.css');
?>
">
<link rel="stylesheet" type="text/css" href="<?php
echo \App\Project::getUrl('app/resources/css/style.css');
?>
">
<script src="<?php
echo \App\Project::getUrl('app/resources/js/') . 'jquery-2.2.0.min.js';
?>
"></script>
</head>