当前位置: 首页>>代码示例>>PHP>>正文


PHP Utils::escape方法代码示例

本文整理汇总了PHP中Utils::escape方法的典型用法代码示例。如果您正苦于以下问题:PHP Utils::escape方法的具体用法?PHP Utils::escape怎么用?PHP Utils::escape使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Utils的用法示例。


在下文中一共展示了Utils::escape方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: breadcrumbs_admin

 /**
  * Generate breadcrumbs from an array of name and URLs
  */
 public static function breadcrumbs_admin(array $links)
 {
     foreach ($links as $name => $url) {
         if ($name != '' && $url != '') {
             $tmp[] = '<span><a href="' . $url . '">' . Utils::escape($name) . '</a></span>';
         } else {
             $tmp[] = '<span>' . __('Deleted') . '</span>';
             return implode(' » ', $tmp);
         }
     }
     return implode(' » ', $tmp);
 }
开发者ID:bohwaz,项目名称:featherbb,代码行数:15,代码来源:AdminUtils.php

示例2: code

 public function code($code, $lang = null, $escaped = false)
 {
     if (isset($this->options['highlight'])) {
         $out = $this->options['highlight']($code, $lang);
         if ($out != null && $out !== $code) {
             $escaped = true;
             $code = out;
         }
     }
     if (!$lang) {
         return '<pre><code>' . ($escaped ? $code : Utils::escape($code, true)) . "\n</code></pre>";
     }
     return '<pre><code class="' . $this->options['langPrefix'] . Utils::escape($lang, true) . '">' . ($escaped ? $code : Utils::escape($code, true)) . "\n</code></pre>\n";
 }
开发者ID:breeswish,项目名称:php-marked,代码行数:14,代码来源:Renderer.php

示例3: error

 protected function error($msg, $http_status = null, $no_back_link)
 {
     // Did we receive a custom header?
     if (!is_null($http_status)) {
         header('HTTP/1.1 ' . $http_status);
     }
     $http_status = (int) $http_status;
     if ($http_status > 0) {
         $this->feather->response->setStatus($http_status);
     }
     // Overwrite existing body
     $this->feather->response->setBody('');
     if (!defined('FEATHER_HEADER')) {
         $this->feather->template->setPageInfo(array('title' => array(Utils::escape($this->feather->config['o_board_title']), __('Info'))));
     }
     $this->feather->template->setPageInfo(array('msg' => $msg, 'no_back_link' => $no_back_link))->addTemplate('message.php')->display();
     // Don't display anything after a message
     $this->feather->stop();
 }
开发者ID:bohwaz,项目名称:featherbb,代码行数:19,代码来源:Error.php

示例4: define

 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 **/
define('__ARMORY__', true);
define('load_characters_class', true);
define('load_mangos_class', true);
define('load_items_class', true);
define('load_search_class', true);
if (!@(include 'includes/armory_loader.php')) {
    die('<b>Fatal error:</b> unable to load system files.');
}
header('Content-type: text/xml');
$advancedItemsSearch = false;
$findGearUpgrade = false;
if (isset($_GET['searchQuery'])) {
    $search->searchQuery = Utils::escape($_GET['searchQuery']);
}
if (isset($_GET['source'])) {
    $advancedItemsSearch = true;
    $search->get_array = $_GET;
}
if (isset($_GET['pi']) && is_numeric($_GET['pi']) && $_GET['pi'] > 0) {
    $findGearUpgrade = true;
    $itemID = (int) $_GET['pi'];
}
if (isset($_GET['rrt']) && $_GET['rrt'] == 'hm') {
    $search->heirloom = true;
}
if (!isset($_GET['searchQuery']) && !isset($_GET['source']) && !isset($_GET['pi']) && !isset($_GET['rrt'])) {
    $xml->LoadXSLT('error/error.xsl');
    $xml->XMLWriter()->startElement('page');
开发者ID:sarrian,项目名称:wowarmory,代码行数:31,代码来源:search.php

示例5: foreach

foreach ($allOrders as $eachOrder) {
    ?>
                        <?php 
    if ($_SESSION['user_id'] == $eachOrder->getUserId()) {
        ?>
                        <tr>
                            <td> <?php 
        echo $eachOrder->getId();
        ?>
 </td>
                            <td> <?php 
        echo $eachOrder->getBusinessId();
        ?>
</td>
                            <td> <?php 
        Utils::escape(Utils::formatDateTime($eachOrder->getDate()));
        ?>
 </td>
                            <td> <?php 
        echo $eachOrder->getStatus();
        ?>
 </td>
                            <td> <?php 
        echo $eachOrder->getAssignedTo();
        ?>
</td>
                            <td> <?php 
        echo $eachOrder->getOrderDetails();
        ?>
</td>
                        </tr>
开发者ID:beshad,项目名称:DROP_OFF_PROJECT_FRI1039,代码行数:31,代码来源:orderlist-view.php

示例6:

        echo Utils::escape($eachOrder->getBusinessId());
        ?>
</td>
                            <td> <?php 
        Utils::escape(Utils::formatDateTime($eachOrder->getDate()));
        ?>
 </td>
                            <td> <?php 
        echo Utils::escape($eachOrder->getStatus());
        ?>
 </td>
                            <td> <?php 
        echo Utils::escape($eachOrder->getAssignedTo());
        ?>
</td>
                            <td> <?php 
        echo Utils::escape($eachOrder->getOrderDetails());
        ?>
</td>
                        </tr>
                    <?php 
    }
    ?>
                    <?php 
}
?>
                    </tbody>
                </table>
            </div>
</div>
开发者ID:beshad,项目名称:DROP_OFF_PROJECT_MON14DEC,代码行数:30,代码来源:orderlist-view.php

示例7:

}
?>

<form action="#" method="post">
    <fieldset>
        <div class="field">
            <label>First name:</label>
            <input type="text" name="flight_booking[first_name]" value="<?php 
echo Utils::escape($flightBooking->getFirstName());
?>
"/>
        </div>
        <div class="field">
            <label>Date:</label>
            <input type="date" name="flight_booking[date]" value="<?php 
echo Utils::escape($flightBooking->getDate()->format('Y-m-d'));
?>
"/>
        </div>
        <div class="field">
            <label>No of passengers:</label>
            <select name="flight_booking[no_of_passengers]">
            <?php 
for ($i = 1; $i < 6; ++$i) {
    ?>
                <option value="<?php 
    echo $i;
    ?>
"
                        <?php 
    if ($i == $flightBooking->getNoOfPassengers()) {
开发者ID:richjava,项目名称:fttl-mvc,代码行数:31,代码来源:add-edit-view.php

示例8:

?>
" required>
            <span id="firstnameError" class="error">Please enter your first name</span>
        </div>
        <div>
            <label for="lastname">Last Name</label>
            <input onblur="validateForm('lastname')" id="lastname" type="text" name="member[last_name]" 
                   value="<?php 
echo Utils::escape($member->getLast_name());
?>
" required>
            <span id="lastnameError" class="error">Please enter your last name</span>
        </div>
        <div>
            <label for="email">Email</label>
            <input onblur="validateEmail()" id="email" type="text" name="member[email]" 
                   value="<?php 
echo Utils::escape($member->getEmail());
?>
" required>
            <span id="emailError" class="error">Please enter your email</span>
            <span id="emailNotValid" class="error">Not a valid Email</span>
        </div>
        <div id="sign_up">
            <input type="submit" name="sign_up" value="Sign Up" class="submit" />
        </div>
    </form>
    <script src="../scripts/formvalidation.js"></script>
</body>

开发者ID:Wooddu,项目名称:MMNZ,代码行数:29,代码来源:signup-view.php

示例9: addAsset

 public function addAsset($type, $asset, $params = array())
 {
     $type = (string) $type;
     if (!in_array($type, array('js', 'css', 'feed', 'canonical', 'prev', 'next'))) {
         throw new \Exception('Invalid asset type : ' . $type);
     }
     if (in_array($type, array('js', 'css')) && !is_file($this->app->forum_env['FEATHER_ROOT'] . $asset)) {
         throw new \Exception('The asset file ' . $asset . ' does not exist');
     }
     $params = array_merge(static::getDefaultParams($type), $params);
     if (isset($params['title'])) {
         $params['title'] = Utils::escape($params['title']);
     }
     $this->assets[$type][] = array('file' => (string) $asset, 'params' => $params);
 }
开发者ID:beaver-dev,项目名称:featherbb-marketplace,代码行数:15,代码来源:View.php

示例10:

        ?>
"><img class="item_img" src="<?php 
        echo Utils::escape($item->getImg_url());
        ?>
" alt="item"></a>
            <div class="tags">
                <a class="item_button" href="index.php?page=detail&item_id=<?php 
        echo Utils::escape($item->getItem_id());
        ?>
"><?php 
        echo Utils::escape($item->getItem_name());
        ?>
</a>
                <div class="price">
                    <p class="price"><?php 
        echo '$' . Utils::escape($item->getItem_price());
        ?>
</p>
                </div>
            </div>

        </div>

    <?php 
    }
    ?>

<?php 
}
?>
开发者ID:Wooddu,项目名称:MMNZ,代码行数:30,代码来源:home-view.php

示例11:

<form action="#" method="post">
    <fieldset>
        <div class="field">
            <label>First name:</label>
            <input type="text" name="flight_booking[first_name]" value="<?php 
echo Utils::escape($flightBooking->getFirstName());
?>
"/>
            <label>Last name:</label>
            <input type="text" name="flight_booking[last_name]" value="<?php 
echo Utils::escape($flightBooking->getLastName());
?>
"/>
            <label>Flight date:</label>
            <input type="date" name="flight_booking[flight_date]" value="<?php 
echo Utils::escape($flightBooking->getFlightDate());
?>
"/>
        </div>    
        <div class="field">
            <label>No of passengers:</label>
            <select name="flight_booking[no_of_passengers]">
            <?php 
for ($i = 1; $i < 6; ++$i) {
    ?>
                <option value="<?php 
    echo $i;
    ?>
"
                        <?php 
    if ($i == $flightBooking->getNoOfPassengers()) {
开发者ID:beshad,项目名称:mvc_moreFieldsAdded,代码行数:31,代码来源:add-edit-view.php

示例12:

/* define variable */
$list = $page->list;
?>

<div class="container">
    <div class="row">
        <div class="col-md-8 col-md-offset-2">
            <h3 class="text-left">
                Delete list <b><?php 
echo Utils::escape($list['name']);
?>
</b> ?
            </h3>
            <form method="post" action="">
                <input type="submit" class="btn btn-t-contrast" value="Yes">
                <a href="<?php 
echo $routes['list_view'] . '?id=' . Utils::escape($list['id']);
?>
" class="btn btn-t-plain">Cancel</a>
            </form>
            <hr>
        </div>
    </div>
</div>

<?php 
require 'includes/scripts.php';
?>
</body>
</html>
开发者ID:tgdn,项目名称:cs139,代码行数:30,代码来源:list_delete.php

示例13: while

while ($item = $page->items->fetchArray(SQLITE3_ASSOC)) {
    ?>
                <li data-id="<?php 
    echo $item['id'];
    ?>
" <?php 
    echo $item['completed'] == 1 ? 'class="completed"' : '';
    ?>
>
                    <input type="checkbox" <?php 
    echo $item['completed'] == 1 ? 'checked' : '';
    ?>
>
                    &nbsp;
                    <input type="text" value="<?php 
    echo Utils::escape($item['content']);
    ?>
">
                    &nbsp;
                    <a href="#">Remove</a>
                </li>
                <?php 
}
?>
            </ul>
        </div>
    </div>
</div>

<?php 
require 'includes/scripts.php';
开发者ID:tgdn,项目名称:cs139,代码行数:31,代码来源:list_view.php

示例14: __construct

 public function __construct($message, $code = 400, $backlink = true)
 {
     parent::__construct(Utils::escape($message), $code);
     $this->backlink = (bool) $backlink;
 }
开发者ID:featherbb,项目名称:featherbb,代码行数:5,代码来源:Error.php

示例15:

            <div class="field">

                <label>id:</label>
                <input type="text" name="user[id]" value="<?php 
    echo Utils::escape($foundUser->getId());
    ?>
"/>

                <label>name:</label>
                <input type="text" name="user[first_name]" value="<?php 
    echo Utils::escape($foundUser->getFirstName());
    ?>
"/>

                <label>Password:</label>
                <input type="text" name="user[user_password]" value="<?php 
    echo Utils::escape($foundUser->getUserPassword());
    ?>
"/>
            </div>
            <div class="wrapper">
                <input type="submit" name="update" value="UPDATE RECORD" class="submit" />
            </div>
        </fieldset>
    </form>
<?php 
}
?>


开发者ID:beshad,项目名称:dropoff_practice_28NOV_2227,代码行数:28,代码来源:find-update-view.php


注:本文中的Utils::escape方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。