您的位置:首页 > 编程语言 > PHP开发

初学PHP的18个基础例程

2011-07-04 09:06 281 查看
一、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
重要的javascripts代码放这
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=\"[url=http://www.webjx.com\'>www.webjx.com.com
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: