使用HTML& Php在一起? [英] Using HTML & Php together?

查看:111
本文介绍了使用HTML& Php在一起?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个支持一些基本功能(如下载/上传)的网站。
到目前为止,我只使用基本的HTML,CSS& Jquery functions ..
然而,我被要求纳入我的另一个学生网站..它执行的功能像上传文档,创建新的数据标本,更新等。他已经使他的网站完全PHP ..
我想了解如何结合他的工作与我到目前为止的任何帮助。

I am required to make a website which supports some basic functions like download/upload. So far I have only done the designing using basic HTML, CSS & Jquery functions.. However i have been asked to incorporate another students website within mine.. which performs functions like .. uploading documents, create new data specimen, update etc.. He has made his website completely on PHP .. I would like help in understand how to combine his work with whatever i have gotten so far?

推荐答案

PHP(和任何其他服务器端技术)用于生成HTML内容并在服务器上处理它,然后将输出返回到客户端的Web

PHP (and any other server side technology) is made to generate HTML contents and processing it on the server before returning the output to the client's web browser.

强烈建议您学习PHP,至少是基础知识。那么你会得到整个想法;但为了使事情清楚(即使我不认为他们会清楚,直到你学习PHP第一)让我告诉你如何结合PHP和HTML作为快速示例:

I Strongly suggest that you learn PHP, at least the fundamentals. then you will get the whole idea; but to make things clear for now (Even though I don't think they will be clear until you learn PHP first) let me show you how to combine PHP and HTML as quick examples:

1-您可以将它们与PHP echo语句结合使用,如下所示:

1- You can combine them with PHP echo statement like this:

 <?php 
 echo "<html>";
 echo "<title>HTML with PHP</title>";
 echo "<b>My Example</b>";

 //your php code here
 // Or you can use the print command

 print "<i>Print works too!</i>"; 
 ?> 

还有其他方法:

2-在HTML中嵌入PHP代码

2- Embedding PHP code within HTML

 <html> 
 <title>HTML with PHP</title>
 <body>
 <h1>My Example</h1>

 <?php
 //your php code here
 ?>

 <b>Here is some more HTML</b>

 <?php
 //more php code
 ?>


 </body>
 </html>

但是,相信我,你会更好地了解当你学习PHP如上所述。另外,有几个资源在互联网开始学习PHP。 (Google是您的朋友!)

However, trust me on this, you will get a better idea of what is going on when you learn PHP as I mentioned above. Plus, there are couple of resources in the internet to start learning PHP from. (Google is your friend!)

祝你好运!

这篇关于使用HTML&amp; Php在一起?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆