`
wangduowu
  • 浏览: 132116 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
文章列表
  汉字->6C49 5B57   public static void main(String[] args) { System.out.println(charsetEncode(汉字)); System.out.println(charsetDeCode(charsetEncode(汉字))); } private String charsetEncode(String str) { if ("".equals(str)) { return ""; } StringB ...
代码: <?php class GetMacAddress { var $return_array = array(); var $mac_addr; function _construct($os_type) { switch (strtolower($os_type)) { case "linux": $this->forLinux(); break; default: $this->forWindows(); break; } $temp_array = ...
  一. $选择器: $(); 替换超链接的内容 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" cont ...
  1. javaScript实现隔行变色: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <style type="text/css"> .datalist tr.altrow{ background-color:#a5e5aa; //隔行变色 } </style ...
    parse_ini_file -- 解析一个配置文件 说明 array parse_ini_file ( string filename [, bool process_sections] )parse_ini_file() 载入一个由 filename 指定的 ini 文件,并将其中的设置作为一个联合数组返回。如果将最后的 process_sections 参数设为 TRUE ,将得到一个多维数组,包括了配置文件中每一节的名称和设置。process_sections 的默认值是 FALSE 。 注: 本函数和 php.in ...

PHP 读取注册表

    博客分类:
  • php
  Example on how to read a registry value: <?php $shell = &new COM ( 'WScript.Shell' ); var_dump ( $shell -> regRead ( 'HKEY_CURRENT_USER\Environment\TEMP' )); ?> (outputs string(39) "%USERPROFILE%\Lokale Einstellungen\Temp" on my system)  
    1. echo函数: 输出函数,是命令,不能返回值。echo后面可以跟很多个参数,之间用分号隔开,如: echo $myvar1; echo 1,2,$myvar,"<b>bold</b>"; 2. print函数: 是函数,可以返回一个值,只能有一个参数。 int print ( string arg ) Outputs arg . Returns 1 , always. 3. printf函数: int printf ...
<?php /* XXTEA encryption arithmetic library. * * Copyright (C) 2006 Ma Bingyao <andot@ujn.edu.cn> * Version: 1.5 * LastModified: Dec 5, 2006 * This library is free. You can redistribute it and/or modify it. */ function long2str($v, $w) { ...

$_SERVER

    博客分类:
  • php
<?php echo "<table border=\"1\">" ; echo "<tr><td>" . $_SERVER [ 'argv' ] . "</td><td>argv</td></tr>" ; echo "<tr><td>" . $_SERVER [ 'argc' ] . "</td><td>argc</td></ ...
    題目の資料に関しては、以下の HP を参照してください。 1. JVMTI 仕様: http://java.sun.com/j2se/1.5.0/ja/docs/ja/guide/jvmti/index.html 2. JNI 仕様: http://java.sun.com/j2se/1.5.0/ja/docs/ja/guide/jni/spec/jniTOC.html (ア)  使い方:  http://www.alles.or.jp/~torutk/oojava/maneuver/2001/jni/jni.h ...
  http://www.fireproject.jp/feature/xml/basic/dtd.html#1 http://www.webword.jp/xml/dtd/index1.html http://www.tohoho-web.com/ex/dtd.htm http://www.atmarkit.co.jp/fxml/tecs/008dtd/08.html

PHP获得URL路径

    博客分类:
  • php
1. PHP获得网站根目录: $_SERVER['DOCUMENT_ROOT']   2. $_SERVER['PHP_SELF'] -- 获取当前正在执行脚本的   3. $_SERVER['HTTP_REFERER'] -- 链接到当前页面的前一页面的 URL 地址。

PHP写入二进制文件

    博客分类:
  • php
一:php将字符串写入二进制文件,并读取文件 函数: unpack()/pack() function createFile(){ //新規フォルダー if(!is_dir($this->folderPath)){ mkdir($this->folderPath); } file_put_contents($this->folderPath."/".$this->fileName, unpack("H*",$this->content)); } function read(){ ...
  1. 获取context实例:   $context = sfContext::getInstance();   2. 在action中获得context对象:   $this->getContext();   3.sfContext获取当前的Request()对象:   $request = sfContext::getInstance()->getRequest();      
--查看数据库的字符集 show variables like 'character\_set\_%'; show variables like 'collation_%'; --设置数据库字符编码 set names 'GBK' alter database payment character set GBK; create database mydb character set GBK; set character_set_client=gbk; set character_set_connection=gbk; set char ...
Global site tag (gtag.js) - Google Analytics