第一个php网页
<?php
date_default_timezone_set('PRC');
if($_POST[ok])
{
//echo "记录";
//echo "here";
$link_id=mysql_connect("127.0.0.1","root","yc9413") or die("failed to connect!");
if($link_id)
{
//echo "success to connect<br />";
//
mysql_select_db("_blog");
$query_test="select *from _blog_";
$result_q=mysql_query($query_test);
$row=mysql_fetch_array($result_q); //echo $row[txt];
//echo "<br />"; $sql="insert into _blog_ values('".$_POST[newtxt]."','".date('Y-m-d H:i:s',time())."')";
$result=mysql_query($sql);
if($result)
{
echo '<html><head><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><meta name="viewport" content="width=device-width, initial-scale=1" /><meta http-equiv="Content-Type" charset="UTF-8" /><meta name="google" content="notranslate" /><title>LeMon | 落星</title><meta name="keywords" content="blog,素材,旅行,电影" /><meta name="description" content="无话和不说,我的两大优点.." /><link rel="stylesheet" href="_css/_index_style.css" /><script type="text/javascript" src="../_js/jquery.js"></script><script type="text/javascript" src="_js/jquery.js"></script><script type="text/javascript" src="_js/_index.js"></script><style></style></head><body class="first_page" id="body_page"><div class="show_pan" id="sp"><h1 id="h01" >Hello LeMon</h1><div id="nt" class="new_txt"><div id="it" class="new_input_txt"><form method="post" action="index.php"><textarea class="new_stuff" id="ns" name="newtxt"></textarea><input type=submit name=ok value="提交" id="put_new_txt" /></form></div></div></div></body></html>'; }else
{
echo "failed to insert";
mysql_close($link_id);
} } }else
{
?>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="Content-Type" charset="UTF-8" />
<meta name="google" content="notranslate" />
<title>LeMon | 落星</title>
<meta name="keywords" content="blog,素材,旅行,电影" />
<meta name="description" content="无话和不说,我的两大优点.." />
<link rel="stylesheet" href="_css/_index_style.css" />
<script type="text/javascript" src="../_js/jquery.js"></script>
<script type="text/javascript" src="_js/jquery.js"></script>
<script type="text/javascript" src="_js/_index.js"></script>
<style> </style>
</head>
<body class="first_page" id="body_page">
<div class="show_pan" id="sp">
<h1 id="h01" >Hello LeMon</h1>
<div id="nt" class="new_txt">
<div id="it" class="new_input_txt">
<form method="post" action="index.php">
<textarea class="new_stuff" id="ns" name="newtxt"> </textarea>
<input type=submit name=ok value="提交" id="put_new_txt" />
</form>
</div>
</div>
</div>
</body>
</html>
<?
} ?>
第一个php网页的更多相关文章
- 用 python 实现一个多线程网页下载器
今天上来分享一下昨天实现的一个多线程网页下载器. 这是一个有着真实需求的实现,我的用途是拿它来通过 HTTP 方式向服务器提交游戏数据.把它放上来也是想大家帮忙挑刺,找找 bug,让它工作得更好. k ...
- 设置一个div网页滚动时,使其固定在头部,当页面滚动到距离头部300px时,隐藏该div,另一个div在底部,此时显示;当页面滚动到起始位置时,头部div出现,底部div隐藏
设置一个div网页滚动时,使其固定在头部,当页面滚动到距离头部300px时,隐藏该div,另一个div在底部,此时显示: 当页面滚动到起始位置时,头部div出现,底部div隐藏 前端代码: <! ...
- javascript一个在网页上画线的库
文章;安利一个绘制指引线的JS库leader-line 一个在网页上划线的库感觉很不错.
- 10分钟搭建一个小型网页(python django)(hello world!)
10分钟搭建一个小型网页(python django)(hello world!) 1.安装django pip install django 安装成功后,在Scripts目录下存在django-ad ...
- bootstrap开发一个简单网页。
CSS代码: body{ padding-top: 50px; padding-bottom: 50px; overflow: auto!important; ...
- 实现一个自适应网页用到的css知识
1 div导致父级高度没有变化是应该子元素设置了float:left等 2 div元素居中 text-align:center; margin-left: auto;margin-right: 3 大 ...
- 分享一个刷网页PV的python小脚本
下面分享一个小脚本,用来刷网页PV. [root@huanqiu ~]# cat www.py #!/usr/bin/python# coding: UTF-8import webbrowser as ...
- CSS制作一个简单网页的下拉导航栏
网页下拉导航栏的制作 网页下拉导航栏的制作很简单,只需要运用好CSS中伪选择器. 首先说明几个简单的伪选择器(比较常用的): link:连接平常的状态 visited:连接被访问过之后 hover:鼠 ...
- 一个检测网页是否有日常链接的python脚本
在大的互联网公司干技术的基本都会碰到测试.预发布.线上这种多套环境的,来实现测试和线上正式环境的隔离,这种情况下,就难免会碰到秀逗了把测试的链接发布到线上的情况,一般这种都是通过一些测试的检查工具来检 ...
- 课时10.第一个HTML网页(掌握)
网页的固定格式 编写网页和写信一样都有一套规范和要求,这套规范和要求中规定了写信的固定格式 写信基本结构 亲爱的xx: 你好! 我.................. ...... 此致 敬礼! xx ...
随机推荐
- ee_15_mvc_db_page----demo---bai
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"% ...
- JQuery需要手动回收xmlHttpRequest对象
今天在园子里面看到kuibono的文章说JQuery不会自动回收xmlHttpRequest对象,并且在每次Ajax请求之后都会创建一个新的xmlHttpRequest对象,感到惊讶,索性写了一个程序 ...
- [转载]Asp.net MVC2 与 MVC3 路由调试好帮手RouteDebug 与 RouteDebugger
RouteDebug 与 RouteDebugger是什么? 在Asp.Net MVC程序中,路由(Route)是一个非常核心的概念,可以说是MVC程序的入口,因为每一个Http请求都要经过路由计算, ...
- PHP扩展编写示例
1.生成描述文件,包含对函数等的定义 [chengyi@localhost php-extension]$ cat hello_cy.def string self_concat(string str ...
- ZOJ - 3195 Design the city
题目要对每次询问将一个树形图的三个点连接,输出最短距离. 利用tarjan离线算法,算出每次询问的任意两个点的最短公共祖先,并在dfs过程中求出离根的距离.把每次询问的三个点两两求出最短距离,这样最终 ...
- 徐汉彬:Web系统大规模并发——电商秒杀与抢购
[导读]徐汉彬曾在阿里巴巴和腾讯从事4年多的技术研发工作,负责过日请求量过亿的Web系统升级与重构,目前在小满科技创业,从事SaaS服务技术建设. 电商的秒杀和抢购,对我们来说,都不是一个陌生的东西. ...
- Android HttpClient get传递数组
url请求格式: String url = "http://10.80.7.26:" + +;
- Oracle Kill Session – FRM-40501
FRM-40501: ORACLE error: unable to reserve record for update or delete frm-40501:oracle 错误:无法保留用于更新或 ...
- 结构体dict_index_t;
/** InnoDB B-tree index */ typedef struct dict_index_struct dict_index_t; /** Data structure for an ...
- VMwareWorkstation10安装OS_X_Mavericks10.9.2图文详细教程
一.VMware的环境配置... 1.1安装VMware的MAC OS补丁... 1.2建立虚拟机... 二.OS_X_Mavericks的安装及安装驱动... ...