您目前尚未登陆,请选择【登陆】或【注册
首页->上传下载->多用户文件上传管理程序源码>>codepress/languages/php.js>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:多用户文件上传管理程序源码
当前文件:文件类型 FileSystem/codepress/languages/php.js打开代码结构图
普通视图
		            
1/* 2 * CodePress regular expressions for PHP syntax highlighting 3 */ 4 5// PHP 6Language.syntax = [ 7 { input : /(&lt;[^!\?]*?&gt;)/g, output : '<b>$1</b>' }, // all tags 8 { input : /(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' }, // style tags 9 { input : /(&lt;script.*?&gt;)(.*?)(&lt;\/script&gt;)/g, output : '<ins>$1</ins><ins>$2</ins><ins>$3</ins>' }, // script tags 10 { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote 11 { input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>'}, // strings single quote 12 { input : /(&lt;\?)/g, output : '<strong>$1' }, // <?.* 13 { input : /(\?&gt;)/g, output : '$1</strong>' }, // .*?> 14 { input : /(&lt;\?php|&lt;\?=|&lt;\?|\?&gt;)/g, output : '<cite>$1</cite>' }, // php tags 15 { input : /(\$[\w\.]*)/g, output : '<a>$1</a>' }, // vars 16 { input : /\b(false|true|and|or|xor|__FILE__|exception|__LINE__|array|as|break|case|class|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|for|foreach|function|global|if|include|include_once|isset|list|new|print|require|require_once|return|static|switch|unset|use|while|__FUNCTION__|__CLASS__|__METHOD__|final|php_user_filter|interface|implements|extends|public|private|protected|abstract|clone|try|catch|throw|this)\b/g, output : '<u>$1</u>' }, // reserved words 17 { input : /([^:])\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // php comments // 18 { input : /([^:])#(.*?)(<br|<\/P)/g, output : '$1<i>#$2</i>$3' }, // php comments # 19 { input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' }, // php comments /* */ 20 { input : /(&lt;!--.*?--&gt.)/g, output : '<big>$1</big>' } // html comments 21] 22 23Language.snippets = [ 24 { input : 'if', output : 'if($0){\n\t\n}' }, 25 { input : 'ifelse', output : 'if($0){\n\t\n}\nelse{\n\t\n}' }, 26 { input : 'else', output : '}\nelse {\n\t' }, 27 { input : 'elseif', output : '}\nelseif($0) {\n\t' }, 28 { input : 'do', output : 'do{\n\t$0\n}\nwhile();' }, 29 { input : 'inc', output : 'include_once("$0");' }, 30 { input : 'fun', output : 'function $0(){\n\t\n}' }, 31 { input : 'func', output : 'function $0(){\n\t\n}' }, 32 { input : 'while', output : 'while($0){\n\t\n}' }, 33 { input : 'for', output : 'for($0,,){\n\t\n}' }, 34 { input : 'fore', output : 'foreach($0 as ){\n\t\n}' }, 35 { input : 'foreach', output : 'foreach($0 as ){\n\t\n}' }, 36 { input : 'echo', output : 'echo \'$0\';' }, 37 { input : 'switch', output : 'switch($0) {\n\tcase "": break;\n\tdefault: ;\n}' }, 38 { input : 'case', output : 'case "$0" : break;' }, 39 { input : 'ret0', output : 'return false;' }, 40 { input : 'retf', output : 'return false;' }, 41 { input : 'ret1', output : 'return true;' }, 42 { input : 'rett', output : 'return true;' }, 43 { input : 'ret', output : 'return $0;' }, 44 { input : 'def', output : 'define(\'$0\',\'\');' }, 45 { input : '<?', output : 'php\n$0\n?>' } 46] 47 48Language.complete = [ 49 { input : '\'', output : '\'$0\'' }, 50 { input : '"', output : '"$0"' }, 51 { input : '(', output : '\($0\)' }, 52 { input : '[', output : '\[$0\]' }, 53 { input : '{', output : '{\n\t$0\n}' } 54] 55 56Language.shortcuts = [ 57 { input : '[space]', output : '&nbsp;' }, 58 { input : '[enter]', output : '<br />' } , 59 { input : '[j]', output : 'testing' }, 60 { input : '[7]', output : '&amp;' } 61]
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:多用户文件上传管理程序源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号