@byxiaoxie6 年前

03/14
10:03
Home

C语言学习(弃坑)

变量类型与输出类型:

int d = 10; //整数型
long ld = 10; //长整型
unsigned ud = 65535 //无符号整型
float f = 1.0; //单精度浮点型
double lf = 1E2; //双精度浮点型
char p = 'C language'; //字符串
char *p = "C language"; //指针字符串

printf("%s\n",p); //字符串输出
printf("%d\n",p); //整数型输出
printf("%f\n",p); //单精度浮点输出
printf("%o\n",p); //八进制输出
printf("%x\n",p); //十六进制输出
printf("%ld\n",p); //长整型输出
printf("%lf\n",p); //双精度浮点输出 
printf("%c\n",p); //字符型输出 
//中文输出
const char text[] = "测试"; 
printf("\n",printf(text));

阅读全文 →

C语言学习(弃坑)

@byxiaoxie7 年前

08/20
22:54
Home

linux-dash监控Linux机器 安装记录

linux-dash 安装记录

项目地址:https://github.com/afaqurk/linux-dash

## 1. 安装go语言 和 git nginx php-common php-fpm 依赖库
sudo yum install golang
sudo yum install git nginx php-common php-fpm

## 2. 下载linux-dash项目文件
git clone –depth 1 https://github.com/afaqurk/linux-dash.git

## 3. 进入linux-dash项目文件
cd linux-dash/app/server

## 4. 利用go语言启动服务(调试)
go run index.go

## 5. 利用nohup后台启动服务
nohup go run index.go &

## 6. php监控

  1. 修改php.ini让php支持 exec, shell_exec, escapeshellarg
  2. 将linux-dash项目文件全部放到web文件夹里面
  3. 打开http://ip or 域名/

QQ截图20170821013623 linux-dash监控Linux机器 安装记录

linux-dash监控Linux机器 安装记录

@byxiaoxie7 年前

07/14
17:43
Home

PHP密码验证(源代码)

<!--
*****************
*By:TKS 17-7-13
******************
-->
<?php
if (isset($_POST['password']) && md5($_POST['password']) == md5('test')) 
{
	echo 'ByXiaoXie';
} 
else 
{
    echo <<<'EOF'
		<!DOCTYPE html>
		<html lang="en">
			<head>
				<meta charset="UTF-8">
				<title>ByXiaoXie</title>
			</head>
			<body>
				<form action='' method='post'>
				<input type='password' name="password" />
				<input type='submit' value='LOGIN'>
				</form>
			</body>
		</html>
EOF;
}
?>

PHP密码验证(源代码)

加载中……