Building Web Pages with PHP(1)- links and urls

1、PHP获得用户端数据的三个来源:

get post cookie

2、$_GET的用法,$_GET是通过url来获得值的,所以,我么这里建立两个最简单的网页,first_page.php 和second_page.php

first_page.php

1 <?php
2 $link = ‘second_page.php?id=1&name=王建华‘;
3 $linkName = ‘第二个页面‘;
4 ?>
5 <a href= <?php echo $link; ?>><?php echo $linkName?></a>

second_page.php

<?php var_dump($_GET);

则点击first_page.php中的链接,我们将得到的页面是:

array(2) { ["id"]=> string(1) "1" ["name"]=> string(9) "王建华" }

这既是$_GET的用法

时间: 2024-08-26 03:04:10

Building Web Pages with PHP(1)- links and urls的相关文章

转:Generating PDFs from Web Pages on the Fly with jsPDF

The Portable Document Format has been one the major innovations in the fields of desktop publishing and office automations. It’s widely used in web publishing too, but unfortunately very often in wrong ways – like using it to replace contents that sh

Web Pages - Efficient Paging Without The WebGrid

Web Pages - Efficient Paging Without The WebGrid If you want to display your data over a number of pages using WebMatrix Beta1, you have two options. One is to use the built-in paging support that comes with the WebGrid helper. But that means that yo

ASP.NET Web Pages (Razor) API Quick Reference

By Tom FitzMacken|February 10, 2014 Print This page contains a list with brief examples of the most commonly used objects, properties, and methods for programming ASP.NET Web Pages with Razor syntax. Descriptions marked with "(v2)" were introduc

IIS7下部署asp.net mvc及asp.net web pages的问题

在IIS7下部署asp.net mvc和asp.net web pages一不小心就会遇到文件找不到的错误,如下图所示: 发生这种问题的根本原因在于IIS7考虑了很多兼容性的东西,解决该问题的方法也很简单就是在配置文件中加入如下的配置项:   <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer>   同类型的问题有不少呢:

New for ASP.NET Web Pages: Conditional attributes

from:http://www.mikepope.com/blog/AddComment.aspx?blogid=2353 March 01, 2012 The beta release of ASP.NET Web Pages has been released (for example, as part of the ASP.NET MVC 4 Beta release). There are only a few differences from the December 2011 Dev

Customizing Site-Wide Behavior for ASP.NET Web Pages (Razor) Sites

By Tom FitzMacken|February 17, 2014 This article explains how to make site-side settings for pages in an ASP.NET Web Pages (Razor) website. What you'll learn: How to run code that lets you set values (global values or helper settings) for all pages i

ASP.NET MVC3 系列教程 – Web Pages 1.0

http://www.cnblogs.com/highend/archive/2011/04/14/aspnet_mvc3_web_pages.html I:Web Pages 1.0中以“_”开头的特别文件(文件命名时不区分大小写) 综上所述得知MVC3的APP初始化顺序为:   (不排除本人未能发现的其他文件类型,但目前据我所知道应用最广的就这三个) 在Web Pages 1.0下,除非你显式以”_”开头命名View.否则你在请求”_”开头的页面时会遇到以下无法服务的页面提示 (这图在Raz

五张图概括 什么是 ASP 、 ASP.NET (Web Pages,Web Forms ,MVC )

当你看懂下面这五张图,我相信你对于学习.NET Web开发路线将不陌生!                                               来源: http://www.w3school.com.cn/ ASP   ASP.NET Web Pages Web Forms MVC 建议结合 : http://msdn.microsoft.com/  学习  !

ASP.NET Web Pages ----学习笔记(二)

C#主要Razor语法规则: Razor代码块由@{...}包围 行内表达式以@开始 代码语句以分号结束 变量通过var关键词进行声明 字符串用引用来包围 C#代码对大小写敏感 C#文件的扩展名是.cshtml 内容块 @RenderPage()从不同的文件导入内容 使用布局页面 @RenderBody()内容页必须以Layout指令开头 防止代码泄露 在ASP.NET中,名称以下划线开头的文件无法通过Web来浏览 隐藏敏感信息 在ASP.NET中,隐藏敏感信息常用方法是把这些信息保存在名为"_