文章列表
<?php
$fp = fopen("fx", "rb");
while(false !== ($ch = fgetc($fp))) echo $ch;
echo "<br><br>";
fseek($fp, 0, SEEK_SET);
while( ! feof($fp)) echo fgets($fp);
echo "<br><br>";
fseek($fp, 0, SEEK_SET);
echo fread($ ...
SESSION和COOKIE
- 博客分类:
- PHP
index.php
<?php
setcookie('user', '付新', time()+3600);
echo $_COOKIE['user'];
setcookie('user','',time()-1);
session_start();
$_SESSION['name'] = "Hello, 付新";
?>
main.php
<?php
session_start();
echo $_SESSION['name'];
unset($_SESSION['name']);
?> ...
<?php
date_default_timezone_set("prc");// 设置时区
echo mktime() ."<br>"; //当前时间戳
echo time()."<br>";
echo date("Y-m-d H:i:s")."<br>"; //获取系统当前时间
echo date("Y年m月d日 H时i分s秒")."<br>";
echo strtoti ...
package com.test;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
...
Window->Java->Editor->Content Assist->Advanced
1、Android初始化时的文件
2、PhotoActivity.java文件
package com.photo;
import android.app.Activity;
import android.os.Bundle;
public class PhotoActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
...