下面以Javascript语言为例来演示:
var a;
var f = function(m){
alert(m);
}
//示例一
if(a){
f();
}
//简写形式
a && f();
//示例二
if(!a){
f();
}
//简写形式
a || f();
//示例三
if(a>3){
f(1);
}else{
f(2);
}
//简写形式
a>3 ? f(1) : f(2);
//假设后台发送的json数据为 '{a:2,b:1}' 存储于str中
var data = eval( '(' + str + ')' );
var url="http://grow.sinaapp.com/?test=a&str='a b+c 编码'";
var out= encodeURI(url);
alert(out);
var arg="http://grow.sinaapp.com/?test=a&str='a b+c 编码'";
var out= encodeURIComponent(arg);
alert(out);
var str="http://grow.sinaapp.com/?test=a&str='a b+c 编码'";
var out= escape(str);
alert(out);
var b = a;
var a={m:2};
var b = a;
b.m = 3;
var a={m:2};
var b = a;
b = {n:3};

非替换元素
$file_name = "info_check.exe";
$file_dir = "/public/www/download/";
if (!file_exists($file_dir . $file_name)) { //检查文件是否存在
echo "文件找不到";
exit;
} else {
$file = fopen($file_dir . $file_name,"r"); // 打开文件
// 输入文件标签
Header("Content-type: application/octet-stream");
Header("Accept-Ranges: bytes");
Header("Accept-Length: ".filesize($file_dir . $file_name));
Header("Content-Disposition: attachment; filename=" . $file_name);
// 输出文件内容
echo fread($file,filesize($file_dir . $file_name));
fclose($file);
exit;}
$file_name = "info_check.exe";
$file_dir = "http://www.easycn.net/";
$file = @ fopen($file_dir . $file_name,"r");
if (!$file) {
echo "文件找不到";
} else {
Header("Content-type: application/octet-stream");
Header("Content-Disposition: attachment; filename=" . $file_name);
while (!feof ($file)) {
echo fread($file,50000);
}
fclose ($file);
}
header ('Content-type: application/'.$file_ext);
header ("Expires: 0");//可选
header ("Pragma: no-cache"); //可选
header ('Content-Disposition: attachment; filename='.$file_name.'');
header ("Content-Length: ".$file_size); //可选
readfile ($file_name);
#创建数据库
CREATE DATABASE IF NOT EXISTS onlineWork;
USE onlineWork
/*
创建表
*/
CREATE TABLE IF NOT EXISTS
czbEdit (
postTime DATETIME NOT NULL PRIMARY KEY,
forcastBegin DATETIME NOT NULL,
forcastType ENUM('first','second','third','forth') NOT NULL,
forcastJson TEXT NOT NULL,
forcastText TEXT NOT NULL,
editName VARCHAR(20) );
sudo apt-get install apache2 mysql-server mysql-client php5 php5-gd php5-mysql
sudo gedit /etc/apache2/httpd.conf
AddType application/x-httpd-php .php .php5
#配置网站所在的文件夹
DocumentRoot "D:/webdocs"
#配置网站文件夹的属性
#当文件不存在时不要列出目录中的文件列表
Options -Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# 控制对此目录的访问权限
#
Order allow,deny
Allow from all
; Directory in which the loadable extensions (modules) reside.
; 此项设置模块所在的目录,注意如果path变量没有设置php安装目录时
; 此项一定要设置为绝对目录,否则Apache将无法正确加载php扩展模块
extension_dir = "D:/softs/php-5.2.17/ext/"
PHP Warning: PHP Startup: Unable to load dynamic library './ext/php_bz2.dll' - \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library './ext/php_curl.dll' - \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3\r\n in Unknown on line 0
[Date]
; Defines the default timezone used by the date functions
date.timezone = Asia/Chongqing
# 让apache自动在每次启动时加载php模块. apache2.2 版本需要加载php5apache2_2.dll
LoadModule php5_module "D:/softs/php-5.2.17/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
# 配置 php.ini 文件所在路径
PHPIniDir "D:/softs/php-5.2.17"
[global]
# http-proxy-exceptions = *.exception.com...
http-proxy-host = 172.18.172.251
http-proxy-port = 80
” />
” type=”text/css” rel=”stylesheet”/>
include_once ABSPATH ."wp-config.php";
include_once ABSPATH ."wp-settings.php";
$fields = array(
'author' => '
'email' => ' ' . ( $req ? '*' : '' ) .
'',
'url' => '' .
'',
);
$required_text = sprintf( ' ' . __('Required fields are marked %s'), '*' );
$defaults = array(
'fields' => apply_filters( 'comment_form_default_fields', $fields ),
'comment_field' => '',
'