code stringlengths 1 2.01M | language stringclasses 1
value |
|---|---|
<?php
class User
{
public $lname='Mishra';
function __set($arg1, $arg2){
echo __LINE__ , "\n\n";
}
function __get($arg1){
echo __LINE__ , "\n\n";
}
function setName()
{
#setting
$this->lname = 'Singh';
}
function getName()
{
#getting
return $this->lname. "\n\n";
}
}
$ratnesh = new U... | PHP |
<?php
echo date("y m d h i s"); | PHP |
<?php
$content = <<<STR
<style>
div{
padding:10px;
/*
border:1px dashed red;
margin:10px;
*/
float:left;
}
ul{
/*border:1px solid blue;*/
padding:0px;
float:left;
}
ul li{
border:1px solid white;
border-radius:10px;
list-style:none;
width:100px;
bac... | PHP |
<?php
$fp = fopen('line_by_line.txt','r+');
while($line = fgets($fp))
{
echo $line;
}
| PHP |
<?php
//echo file_get_contents('layout.html');
echo file_get_contents('test.php');
| PHP |
<?php
$content = <<<STR
<?php
echo date("y m d h i s");
STR;
file_put_contents('test.php',$content);
| PHP |
<?php
$fp = fopen('line_by_line.txt','w+');
foreach($_SERVER as $key=>$value)
{
fputs($fp,"$key=>$value \n");
}
print_r($_SERVER);
| PHP |
<?php
$hits = (int)file_get_contents('count.txt') + 1;
file_put_contents('count.txt',$hits);
| PHP |
<?php
session_start();
$_SESSION['data'] = $_POST;
if($_SERVER['HTTP_REFERER'] !='http://localhost/nb158jk/session_form/a.php') {
header("location:a.php");
}
//echo $_SERVER['HTTP_REFERER'];
?>
<form action="c.php" method="post">
<table border="1" align="center">
<thead>
<tr>
<th colspan="2">Please fill ... | PHP |
<?php
session_start();
$_SESSION['data'] = array_merge($_POST,$_SESSION['data']);
if($_SERVER['HTTP_REFERER'] !='http://localhost/nb158jk/session_form/c.php') {
header("location:a.php");
}
?>
<form action="save.php" method="post">
<table border="1" align="center">
<thead>
<tr>
<th colspan="2">Please fil... | PHP |
<?php
session_start();
$_SESSION['data'] = array_merge($_POST,$_SESSION['data']);
if($_SERVER['HTTP_REFERER'] !='http://localhost/nb158jk/session_form/b.php') {
header("location:a.php");
}
?>
<form action="d.php" method="post">
<table border="1" align="center">
<thead>
<tr>
<th colspan="2">Please fill t... | PHP |
<?php
session_start();
if($_SERVER['HTTP_REFERER'] !='http://localhost/nb158jk/session_form/d.php') {
header("location:a.php");
}
$_SESSION['data'] = array_merge($_POST,$_SESSION['data']);
echo '<pre>';
print_r($_SESSION);
| PHP |
<?php
for( ; ; ){
echo 'Hello ';
}
| PHP |
<?php
$m1 = memory_get_usage();
$t1 = microtime();
$table = '<table border="1" width="50%" align="center" cellpadding="10">';
for ($i = 1; $i <=15 ; $i++)
{
$color = ($i%2==0)?"yellow":"pink";
$table .= '<tr>
<td style="background-color:'.$color.'">
Data '.$i.'
</td>
</tr>';
}//end for
$ta... | PHP |
<?php
$a = 'Hello';$b = 'World';
$c = 'Php';
echo "This is $a and $b in $c";
echo "\n\n";
echo 'This is $a and $b in $c';
echo "\n\n";
| PHP |
<table border="1" cellspacing="5" cellpadding="10" width="70%" align="center">
<thead>
<tr>
<th>Table Heading</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 1; $i <= 10 ; $i++)
{
$color = $i%2==0?"yellow":"green";
?>
<tr>
<td style="background-color:<?=$color?>">Text <?=$i?></td>
</tr>
... | PHP |
<?php
function hello() {
global $a;
$a = 20;
}
function world() {
global $a;
return $a;
}
hello();
echo world();
| PHP |
<?php
define('ITEMS',5);
define('COLS',4);
$count = 1;
$rows = ceil(ITEMS / COLS );
?>
<table border="1" width="80%">
<?php
for ($i = 1; $i <= $rows; $i++)
{
?>
<tr>
<?php
for ($j = 1; $j <= COLS; $j++)
{
if($count <= ITEMS) {
?>
<td>Hello <?=$count++?></td>
<?php
} else {//end if
echo "<td>N... | PHP |
<?php
function add($a=0,$b=0)
{
return $a+$b;
}
echo add(NULL,6);
| PHP |
<?php
print_r($argc);// number of argument
print_r($argv);// arguments as array
| PHP |
<?php
$funArr = ['add','sub','mul','div'];
$randKey = array_rand($funArr);
echo $funArr[$randKey];
echo $funArr[$randKey](24,6);
function add($a=0,$b=0){
return $a+$b;
}
function sub($a=0,$b=0){
return $a-$b;
}
function mul($a=0,$b=1){
return $a*$b;
}
function div($a=0,$b=1){
return $a/$b;
}
| PHP |
<form name="register" method="get">
<input type="text" name="uname" value="<?=rand(1,1100)?>" id="" />
<span onclick="submitFrm()">Click Here to sbmt</span>
</form>
<script type="text/javascript">
function submitFrm()
{
document.register.method="POST";
document.register.action="http://googl... | PHP |
<?php
$lang = 'php';
$php = 'version';
$version = 'five';
$five = 'author';
$author = 'rasmus';
echo $lang,"\n",
$$lang,"\n",
$$$lang,"\n",
$$$$lang,"\n",
$$$$$lang,"\n";
| PHP |
<?php
$src = 'http://ecx.images-amazon.com/images/I/41h4lrWBkFL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU31_.jpg';
$dest = 'php_image_123.jpg';
//copy($src,$dest);
move_uploaded_file($src,$dest);
| PHP |
<?php
function testFalse($num=0){
if($num === false){
$arr['msg']= "is Not Number,it's boolean false ";
$arr['flag'] = true;
} else
if($num === 0){
$arr['msg']= "is Number,it's 0 ";
$arr['flag'] = true;
} else
if($num === NULL){
$arr['msg']= "is Nothing,it's NULL ";
$arr['flag'] = tru... | PHP |
<?php
echo 'Hello';
?>
| PHP |
<?php
print_r($_POST);
?>
<form name="register" action="" method="post">
<input type="text" name="uname" value="<?=rand(1,1100)?>" id="" />
</form>
<script src="../jQuery/jquery-1.10.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
test(1);
functio... | PHP |
<?php
function fact($num=0)
{
if($num==1){
return 1;
} else {
return $num * fact($num-1);
}
}
echo fact(5);
| PHP |
<?php
function test()
{
echo "Hello ";
test();
}
test();
| PHP |
<?php
$a = 9;
$b = 20;
$c = 'monkey';
printf("%d %s sit on %d trees\n\n",$a,$c,$b);
$var = sprintf("%d %s sit on %d trees\n\n",$b,$c,$a);
echo $var,$var;
| PHP |
-:Super Global Varibales :-
Note : All the super global varibales are an "associative Array"
1)
$_GET :
-------
Accept Data from URL as "query String"
2)
$_POST :
-------
Accept Data from HTML <from> after submission when click on submit btn.
3)
$_REQUEST = $_GET + $_POST + $_COOKIE
4)
$_FILES :
---------
Provides... | PHP |
<?php
//setcookie('Uname','UmaShankar');
//setcookie('Password','123445@qwerty');
echo "<pre>";
print_r($_COOKIE);
| PHP |
<?php
echo '<pre>';
print_r($_POST);
print_r($_REQUEST);
echo '</pre>';
?>
<form action="" method="post">
<input type="text" name="uname"/>
<input type="submit" value="Post It!!" />
</form>
| PHP |
<?php
echo '<pre>';
print_r($_POST);
print_r($_FILES);
echo '</pre>';
?>
<form action="" method="post"
enctype="multipart/form-data">
Name :<input type="text" name="uname"/><br>
Avatar : <input type="file" name="avatar"/><br>
<input type="submit" value="Upload Data !!" />
</form>
| PHP |
<?php
//http://localhost/phpmb127/GET_POST_REQUEST/get.php?name=php&age=15&father=raasmus
echo '<pre>';
print_r($_GET);
print_r($_REQUEST);
echo '</pre>';
| PHP |
<?php
$m1 = memory_get_usage();
?>
<table border="1" width="50%" align="center" cellpadding="10">
<?php
for ($i = 1; $i <=15 ; $i++)
{
$color = ($i%2==0)?"yellow":"lightyellow";
?>
<tr>
<td style="background-color:<?=$color?>">
Data <?=$i?>
</td>
</tr>
<?php
}//end for
?>
</table>
<?php
$m2... | PHP |
<?php
echo '<table border="1" width="50%" align="center" cellpadding="10">';
for ($i = 1; $i <=15 ; $i++)
{
$color = ($i%2==0)?"yellow":"pink";
echo '<tr>
<td style="background-color:'.$color.'">
Data '.$i.'
</td>
</tr>';
}//end for
echo '</table>';
| PHP |
<?php
define('ITEMS',10);
define('COLS',3);
$rows = ceil(ITEMS / COLS );
?>
<table border="1" cellspacing="5" cellpadding="10" width="70%" align="center">
<tbody>
<?php
for ($i = 1,$count=1; $i <= $rows ; $i++)
{
$color = $i%2==0 ? "yellow":"lightyellow";
?>
<tr>
<?php
for ($k = 1; $k <= COLS ; $k++)
{
if($co... | PHP |
<?php
function test($a,$a,$a,$a,$a){
echo $a;
}
test(1,2,3,4,5);
echo "\n-------------\n";
check(1,'two',3,'four');
function check()
{
echo func_num_args();
print_r(func_get_args());
echo func_get_arg(1);
}
echo "\n-------------\n";
| PHP |
<?php
function calculate()
{
static $num = 1;
return $num++;
}
echo calculate();
echo calculate();
echo calculate();
echo calculate();
| PHP |
<?php
$hello = 5;
function check(&$a) {
$a *= 2;
return $a;
}
echo $hello;
echo "\n--------------\n";
echo check($hello);
echo "\n--------------\n";
echo $hello;
| PHP |
<?php
mysql_connect('localhost','root','');
mysql_select_db('nb158jk');
| PHP |
<?php
require_once('./db.php');
$id = $_POST['id'];
$query = "SELECT * FROM `categories` WHERE `parent_id`=$id";
$result = mysql_query($query) or die(mysql_error());
while ($ans = mysql_fetch_assoc($result)) {
$catAray[] = $ans;
}
echo json_encode($catAray);
| PHP |
<?php
if(!empty($_POST)) {
print_r($_POST);
}
?>
<script type="text/javascript" src="jquery-1.10.1.min.js"></script>
<script type="text/javascript">
$(function(){
function getCategory(id,divId,fieldName){
var URL = 'response.php';
$.ajax({
url:URL,
data:{'id':id},
dataType... | PHP |
<?php
phpinfo();
?>
| PHP |
<?php
$con = mysql_connect("127.0.0.1","root","decode~U");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_query("set names 'UTF8'");
?> | PHP |
<?php
include"Connect.php";
include"Chat/DataOperation.php";
function Initialize(){
$xml = simplexml_load_file("GameInfo.xml");
$xml->gamemode=1; //1游戏准备,2游戏进行,3游戏人数已满,0游戏停止
$xml->loop=$xml->loop+1;
$xml->playeramount=0;
$xml->begintime=null;
$xml->overtime=null;
$xml->maxkiller=null;
$xml->maxc... | PHP |
<?php
session_start();
include"Connect.php";
require('./Smarty/libs/Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir = './Smarty/blog/templates/';
$smarty->compile_dir = './Smarty/blog/templates_c/';
$smarty->config_dir = './Smarty/blog/configs/';
$smarty->cache_dir = './Smarty/blog/cache/';
... | PHP |
<?php
session_start();
include "Connect.php";
require('./Smarty/libs/Smarty.class.php');
$xml = simplexml_load_file("GameSetting.xml");
$smarty = new Smarty;
$smarty->template_dir = './Smarty/templates/';
$smarty->compile_dir = './Smarty/templates_c/';
$smarty->config_dir = './Smarty/configs/';
$smarty->c... | PHP |
<?php
session_start();
include "Connect.php";
require('./Smarty/libs/Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir = './Smarty/templates/';
$smarty->compile_dir = './Smarty/templates_c/';
$smarty->config_dir = './Smarty/configs/';
$smarty->cache_dir = './Smarty/cache/';
$smarty->assign... | PHP |
<?php
session_start();
require('./Smarty/libs/Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir = './Smarty/templates/';
$smarty->compile_dir = './Smarty/templates_c/';
$smarty->config_dir = './Smarty/configs/';
$smarty->cache_dir = './Smarty/cache/';
$smarty->assign('title','首页');
$smarty->assign('op... | PHP |
<?php
session_start();
require('./Smarty/libs/Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir = './Smarty/templates/';
$smarty->compile_dir = './Smarty/templates_c/';
$smarty->config_dir = './Smarty/configs/';
$smarty->cache_dir = './Smarty/cache/';
$smarty->assign('title','注册');
$smarty->... | PHP |
<?php
include"Connect.php";
if (mysql_query("CREATE DATABASE db_1012",$con))
{
echo "Database created";
}
else
{
echo "Error creating database: " . mysql_error();
}
mysql_select_db("db_1012", $con);
$sql = "CREATE TABLE UserSet (
id int(8) NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
Passwor... | PHP |
<?php
$con=$_GET["q"];
$nam=$_GET["n"];
$atti=$_GET["a"];
if($atti==0)
{
$xml_00 = simplexml_load_file("data/ChatData_0.xml");
$i=0;
$Check=$xml_00->Message[$i]->Content;
while($Check!='')
{echo '    '.$xml_00->Message[$i]->Name.' : '.$xml_00->Message[$i]->Content.... | PHP |
<?php
function CleanChatData(){
$xmlchat_0 = simplexml_load_file("Chat/data/ChatData_0.xml");
$i=0;
$Check=$xmlchat_0->Message[$i]->Name;
while($Check!='')
{
$xmlchat_0->Message[$i]->Content='';
$xmlchat_0->Message[$i]->Name='';
$xmlchat_0->Message[$i]->Time='';
$i++;
$Check=$xmlcha... | PHP |
<?php
/**
* Project: Smarty: the PHP compiling template engine
* File: SmartyBC.class.php
* SVN: $Id: $
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;... | PHP |
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty lower modifier plugin
*
* Type: modifier<br>
* Name: lower<br>
* Purpose: convert string to lowercase
*
* @link http://www.smarty.net/manual/en/language.modifier.lower.php lower (Smarty o... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty upper modifier plugin
*
* Type: modifier<br>
* Name: lower<br>
* Purpose: convert string to uppercase
*
* @link http://smarty.php.net/manual/en/language.modifier.upper.php lower (Sm... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty count_words modifier plugin
*
* Type: modifier<br>
* Name: count_words<br>
* Purpose: count the number of words in a text
*
* @link http://www.smarty.net/manual/en/language.modifier.c... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty to_charset modifier plugin
*
* Type: modifier<br>
* Name: to_charset<br>
* Purpose: convert character encoding from internal encoding to $charset
*
* @author Rodney Rehm
* @param ar... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFunction
*/
/**
* Smarty {html_table} function plugin
*
* Type: function<br>
* Name: html_table<br>
* Date: Feb 17, 2003<br>
* Purpose: make an html table from an array of data<br>
* Params:
* <pre>
* - loop - array to ... | PHP |
<?php
/**
* Smarty shared plugin
*
* @package Smarty
* @subpackage PluginsShared
*/
/**
* convert characters to their decimal unicode equivalents
*
* @link http://www.ibm.com/developerworks/library/os-php-unicode/index.html#listing3 for inspiration
* @param string $string characters to calculate unicode of
... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty strip_tags modifier plugin
*
* Type: modifier<br>
* Name: strip_tags<br>
* Purpose: strip html tags from text
*
* @link http://www.smarty.net/manual/en/language.modifier.strip.tags.ph... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty string_format modifier plugin
*
* Type: modifier<br>
* Name: string_format<br>
* Purpose: format strings via sprintf
*
* @link http://www.smarty.net/manual/en/language.modifier.string... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty default modifier plugin
*
* Type: modifier<br>
* Name: default<br>
* Purpose: designate default value for empty variables
*
* @link http://www.smarty.net/manual/en/language.modifier.d... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsShared
*/
/**
* evaluate compiler parameter
*
* @param array $params parameter array as given to the compiler function
* @param integer $index array index of the parameter to convert
* @param mixed $default value to be returned if the ... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFunction
*/
/**
* Smarty {html_checkboxes} function plugin
*
* File: function.html_checkboxes.php<br>
* Type: function<br>
* Name: html_checkboxes<br>
* Date: 24.Feb.2003<br>
* Purpose: Prints out a list of checkb... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFunction
*/
/**
* Smarty {cycle} function plugin
*
* Type: function<br>
* Name: cycle<br>
* Date: May 3, 2002<br>
* Purpose: cycle through given values<br>
* Params:
* <pre>
* - name - name of cycle (optional)
* - value... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty unescape modifier plugin
*
* Type: modifier<br>
* Name: unescape<br>
* Purpose: unescape html entities
*
* @author Rodney Rehm
* @param array $params parameters
* @return string w... | PHP |
<?php
/**
* Smarty shared plugin
*
* @package Smarty
* @subpackage PluginsShared
*/
if(!function_exists('smarty_mb_wordwrap')) {
/**
* Wrap a string to a given number of characters
*
* @link http://php.net/manual/en/function.wordwrap.php for similarity
* @param string $str the string t... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty from_charset modifier plugin
*
* Type: modifier<br>
* Name: from_charset<br>
* Purpose: convert character encoding from $charset to internal encoding
*
* @author Rodney Rehm
* @para... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty count_paragraphs modifier plugin
*
* Type: modifier<br>
* Name: count_paragraphs<br>
* Purpose: count the number of paragraphs in a text
*
* @link http://www.smarty.net/manual/en/lang... | PHP |
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage PluginsModifier
*/
/**
* Smarty spacify modifier plugin
*
* Type: modifier<br>
* Name: spacify<br>
* Purpose: add spaces between characters in a string
*
* @link http://smarty.php.net/manual/en/language.modifier.spacify.php spacify (Smarty... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFunction
*/
/**
* Smarty {html_radios} function plugin
*
* File: function.html_radios.php<br>
* Type: function<br>
* Name: html_radios<br>
* Date: 24.Feb.2003<br>
* Purpose: Prints out a list of radio input type... | PHP |
<?php
/**
* Smarty plugin to format text blocks
*
* @package Smarty
* @subpackage PluginsBlock
*/
/**
* Smarty {textformat}{/textformat} block plugin
*
* Type: block function<br>
* Name: textformat<br>
* Purpose: format text a certain way with preset styles
* or custom wrap/indent setting... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty strip modifier plugin
*
* Type: modifier<br>
* Name: strip<br>
* Purpose: Replace all repeated spaces, newlines, tabs
* with a single space or supplied replacement string.<... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifier
*/
/**
* Smarty capitalize modifier plugin
*
* Type: modifier<br>
* Name: capitalize<br>
* Purpose: capitalize words in the string
*
* {@internal {$string|capitalize:true:true} is the fastest option for MBString enabled ... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage Debug
*/
/**
* Smarty debug_print_var modifier plugin
*
* Type: modifier<br>
* Name: debug_print_var<br>
* Purpose: formats variable contents for display in the console
*
* @author Monte Ohrt <monte at ohrt dot com>
* @param array|obj... | PHP |
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty indent modifier plugin
*
* Type: modifier<br>
* Name: indent<br>
* Purpose: indent lines of text
*
* @link http://www.smarty.net/manual/en/language.modifier.indent.php indent (Smarty onli... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFunction
*/
/**
* Smarty {fetch} plugin
*
* Type: function<br>
* Name: fetch<br>
* Purpose: fetch file, web or ftp data and display results
*
* @link http://www.smarty.net/manual/en/language.function.fetch.php {fetch}
* (Sma... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* @ignore
*/
require_once( SMARTY_PLUGINS_DIR .'shared.literal_compiler_param.php' );
/**
* Smarty escape modifier plugin
*
* Type: modifier<br>
* Name: escape<br>
* Purpose: escape string... | PHP |
<?php
/**
* Smarty shared plugin
*
* @package Smarty
* @subpackage PluginsShared
*/
/**
* Function: smarty_make_timestamp<br>
* Purpose: used by other smarty functions to make a timestamp from a string.
*
* @author Monte Ohrt <monte at ohrt dot com>
* @param DateTime|int|string $string date object, times... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFunction
*/
/**
* @ignore
*/
require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
/**
* @ignore
*/
require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
/**
* Smarty {html_select_date} plugin
*
* Type: func... | PHP |
<?php
/**
* Smarty shared plugin
*
* @package Smarty
* @subpackage PluginsShared
*/
if (version_compare(PHP_VERSION, '5.2.3', '>=')) {
/**
* escape_special_chars common function
*
* Function: smarty_function_escape_special_chars<br>
* Purpose: used by other smarty functions to escape
... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFunction
*/
/**
* Smarty {html_options} function plugin
*
* Type: function<br>
* Name: html_options<br>
* Purpose: Prints the list of <option> tags generated from
* the passed parameters<br>
* Params:
* <pre>
* - name... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty wordwrap modifier plugin
*
* Type: modifier<br>
* Name: wordwrap<br>
* Purpose: wrap a string of text at a given length
*
* @link http://smarty.php.net/manual/en/language.modifier.w... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty cat modifier plugin
*
* Type: modifier<br>
* Name: cat<br>
* Date: Feb 24, 2003<br>
* Purpose: catenate a value to a variable<br>
* Input: string to catenate<br>
* Example: ... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFunction
*/
/**
* Smarty {html_image} function plugin
*
* Type: function<br>
* Name: html_image<br>
* Date: Feb 24, 2003<br>
* Purpose: format HTML tags for the image<br>
* Examples: {html_image file="/images/masthead.gif"}<b... | PHP |
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage PluginsFunction
*/
/**
* Smarty {counter} function plugin
*
* Type: function<br>
* Name: counter<br>
* Purpose: print out a counter value
*
* @author Monte Ohrt <monte at ohrt dot com>
* @link http://www.smarty.net/manual/en/language.functi... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifier
*/
/**
* Smarty date_format modifier plugin
*
* Type: modifier<br>
* Name: date_format<br>
* Purpose: format datestamps via strftime<br>
* Input:<br>
* - string: input date string
* - format: strftime ... | PHP |
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage PluginsModifier
*/
/**
* Smarty replace modifier plugin
*
* Type: modifier<br>
* Name: replace<br>
* Purpose: simple search/replace
*
* @link http://smarty.php.net/manual/en/language.modifier.replace.php replace (Smarty online manual)
* @... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty count_sentences modifier plugin
*
* Type: modifier<br>
* Name: count_sentences
* Purpose: count the number of sentences in a text
*
* @link http://www.smarty.net/manual/en/language.mo... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty count_characters modifier plugin
*
* Type: modifier<br>
* Name: count_characteres<br>
* Purpose: count the number of characters in a text
*
* @link http://www.smarty.net/manual/en/lan... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifier
*/
/**
* Smarty truncate modifier plugin
*
* Type: modifier<br>
* Name: truncate<br>
* Purpose: Truncate a string to a certain length if necessary,
* optionally splitting in the middle of a word, and
* ... | PHP |
<?php
/**
* Smarty shared plugin
*
* @package Smarty
* @subpackage PluginsShared
*/
if (!function_exists('smarty_mb_str_replace')) {
/**
* Multibyte string replace
*
* @param string $search the string to be searched
* @param string $replace the replacement string
* @param string $sub... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifier
*/
/**
* Smarty escape modifier plugin
*
* Type: modifier<br>
* Name: escape<br>
* Purpose: escape string for output
*
* @link http://www.smarty.net/manual/en/language.modifier.count.characters.php count_characters (Smarty... | PHP |
<?php
/**
* Smarty plugin
*
* This plugin is only for Smarty2 BC
* @package Smarty
* @subpackage PluginsFunction
*/
/**
* Smarty {math} function plugin
*
* Type: function<br>
* Name: math<br>
* Purpose: handle math computations in template
*
* @link http://www.smarty.net/manual/en/language.functi... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifier
*/
/**
* Smarty regex_replace modifier plugin
*
* Type: modifier<br>
* Name: regex_replace<br>
* Purpose: regular expression search/replace
*
* @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php
* ... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFilter
*/
/**
* Smarty trimwhitespace outputfilter plugin
*
* Trim unnecessary whitespace from HTML markup.
*
* @author Rodney Rehm
* @param string $source input string
* @param Smarty_Internal_Template $smarty Smarty ob... | PHP |
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsFilter
*/
/**
* Smarty htmlspecialchars variablefilter plugin
*
* @param string $source input string
* @param Smarty_Internal_Template $smarty Smarty object
* @return string filtered output
*/
function smarty_variablefilter... | PHP |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.