TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Basic PHP Tutorials

1 点作者 ryan21030将近 9 年前
Hi, I want to teach people PHP and am making two youtube series at the minute, a basics of PHP one (link here: https://www.youtube.com/watch?v=iLzE8BBMbQ4) and a Coding a PHP forum tutorial (up tomorrow!). I wanted to ask you guys if you could give me any feedback please? All would be hugely appreciated!

1 comment

LarryMade2将近 9 年前
I would have started with what PHP does (it is a scripting language interpreted by the web server before the page is sent to the browser.)<p>PHP pages MUST be named correctly (with .php)<p>PHP code needs to be within a special set of tags (?php ?) it tells the server that inside those tags interpret the PHP code.<p>First I would do a quick hello world explaining what PHP usually does is add content to the HTML page (show source of output?), and to do that you need to echo or print the data. You can also include formatting ...HTML formatting.<p><pre><code> remember, all PHP code needs to be within in &lt;?php ?&gt; &lt;?php echo &quot;hello world&quot;; ?&gt; </code></pre> (End statements with a ; Enclose strings within &quot;&quot; or &#x27;&#x27;)<p>Mention you can have multiple php blocks, things are done sequentially, etc. The go onto variables, conditionals, etc.<p>The important part is start out with a simple success:<p><pre><code> echo &quot;hello world&quot;; </code></pre> instant gratification get them knowing they CAN make something, before you get too complex, to know they are already on the right track. Starting off with variables and such and getting syntax errors (or worse) right off might frustrate them too early.