当前位置: 首页 > 工具软件 > PHP Web Stat > 使用案例 >

PHP Web

步骏
2023-12-01

<?php

include('model/header.html');

?>

define ('TITLE','My Title');

<?php

include('model/footer.html');

?>


header.html

<?php

if (defined('TITLE')) {

print TITLE;

}

?>


date('D',$var);

mail('a@a.com','title',$body,"From:m@m.com\r\nc@c.com");


<?php

ob_start();

?>

<?php

ob_end_flush();

?>


<?php

ob_end_flush();

header('Location: page.php');

exit();

?>


<?php

setcookie('name',$var,$time+3600,'/path/','www.aaa.com',$onlyhttps);

print $_COOKIE['name'];

setcookie('name',FALSE,time()-600,'/path/','www.aaa.com',$onlyhttps);

?>


<?php

session_start();

$_SESSION['name'] = "Mine";

?>

<?php

session_start();

print "$_SESSION['name']";

?>


<?php

function my_func($name,$name2 = 'name2') {

print "$name . $name2";

}


myfunc('name');


function my_func2($name) {

return 'my:' . $name;

}

$myfunc2 = my_func2('name');

print "$myfunc2" . my_func2('nameo');

?>


<?php

function myglobalvar() {

global $var;

}

$var = 1;

print "$var";

myglobalvar();

print "$var";

?>


file_exists('my.txt')

touch('my.txt')

file_put_contents($file,$data,FILE_APPEND)

/*

$fp = fopen($file,mode);

fwrite($fp,$data,PHP_EOL);

fclose($fp);

*/

$flock($fp,locktype);//LOCK_SH,LOCK_EX,LOCK_UN,LOCK_NB

$data = file_get_contents($file);

$data = file($file);


move_uploaded_file($_FILES['file_name']['tmp_name'],'/a/a.txt');


$stuff = scandir($dir)

$size = filesize($file)


$fp = fopen($file, 'rb');

while (!feof($fp)) {

$string  = fgets($fp,1024);

}

fclose($fp);

 类似资料:

相关阅读

相关文章

相关问答