易截截图软件、单文件、免安装、纯绿色、仅160KB

初学PHP的18个基础例程

 
如何创建我们的第一个PHP页面呢?非常简单的!选择我们使用的一个最好的设计工具,当然你也可以 只使用记事本。创建之后记得要保存为扩展名为PHP的文件,然后传到我们的服务器
上。
  在编写PHP程序之前通常我们需要配置我们的环境,也就是说服务器
要支持PHP才能行啊
  一、PHP的基本结构:
  使用Include函数
<Html>
<Head>
<title>Your page Subject and domain name</title>
  上面内容为我们使用的每个页面的标题,不要动。
  每个页的头部:
<Meta NAME="" CONTENT="">
"" your others meta tag
"" your others meta tag
"" your others meta tag
"" your others meta tag
"" your others meta tag
"" your others meta tag
"" your others meta tag
重要的javascript
s代码放这
CSS设置放这
  上述内容保存为header.php
,使每个页面的头部都是一样的。
<?PHP include("header.php
")?>
</head>
<body>
  你的页的所有内容
</body>
</html>
  保存为footer.php
,使每个页面的底部都一样。
<? include("footer.php
");?>
  填写我们的版权信息
</body>
</html>
  二:如何输出文本或者把文本建立连接用PHP
  在PHP中如何显示文本呢?使用下面的命令:
<?php
echo "Hello in php
";?>
  如何创建一个连接呢?
<?php
echo "<a href=\"http://www.webjx.com\">
www.webjx.com.com
</a>";?>
  如何创建一个有style的连接呢?
<?php
echo "<font style=\"color:blue;font-size:10px;font-
family:verdana;\">Free Scripts By: <a
href=\"http://www.webjx.com.com\" target=\"_blank\" title=\"Free
Scripts By: webjx.com\">
http://www.webjx.com<
;/font></a>";?>
  "echo"是用来显示输出的。
  三:如何实现分页:
  如果好多内容在你的页面中这时我们就考虑用分页形式来实现显示了。
  简单的分页代码:
<html>
<head>
<title>webjx.com</tit


相关文档:

PHP 5.2.11安装

#找到:
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gz ......

PHP 几个路径函数

 //
dirname()
// Returns directory name component of path
basename()
// Returns filename component of path
pathinfo()
// Returns information about a file path;
// pathinfo() returns an associative array containing information about path .
parse_url()
// Parse a URL and return its comp ......

php的session要在其他页面怎么得到

不是很赞同使用session   每一个php的页面在调用session的时候都必须先声明session。
例如:在php文件的最前面声明session;
<?php
session_start();//声明session
$_SESSION['id']=$_POST['id'];//赋值
?>
如果不这样声明的话,也免就无法获得已经定义好的sessio ......

PHP会话(Session)使用入门

对比起 Cookie,Session 是存储在服务器端的会话,相对安全,并且不像 Cookie 那样有存储长度限制,本文简单介绍 Session 的使用。
由于 Session 是以文本文件形式存储在服务器端的,所以不怕客户端修改 Session 内容。实际上在服务器端的 Session 文件,PHP 自动修改 Session 文件的权限,只保留了系统读和写权限,而 ......

PHP实例:用SESSION方法实现验证码

index.php(实现输入验证码页面)代码如下: Code代码如下: <html>
<head>
<title>check code</title>
</head>
<body>
<form name=check method=post action=check.php>
<input type=hidden name=init value=1>
验证 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号