我怎样才能在我的电脑上试验php? [英] How can I experiment with php on my pc?

查看:56
本文介绍了我怎样才能在我的电脑上试验php?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够在我的电脑上玩一些php脚本

而无需支付公司来托管域名。


我已下载php进入我的电脑,至少我认为我有一个文件夹

名为php已经出现在我的C:驱动器上,我已经下载并且

安装了Abyss web服务器这看似有效。我还有

将HTML Kit作为我的html编辑器。


如何在我的电脑上使用简单的PHP脚本才能正常工作?我在哪里保存文件?


我知道这对某些人来说听起来有点过分了,但我得到了一个真实的

头痛阅读php手册,坦率地说,我不理解其中的一半。


问候

I want to be able to play around with some php scripting on my pc
without paying a company to host a domain.

I have downloaded php onto my pc, at least I think I have, a folder
called php has appeared on my C: drive, and I have downloaded and
installed the Abyss web server and that appears to be working. I also
have HTML Kit as my html editor.

How do I get simple php scripts to work properly on my pc though? Where
do I save the files?

I know this may sound so simplistic to some, but I''m getting a real
headache reading the php manual, frankly I don''t understand half of it.

Regards

推荐答案

在我们的上一集中,

< 11 ********************* @ z14g2000cwz.googlegroups。 com>,

可爱而有才华的Denebola

在comp.lang.php上广播:
In our last episode,
<11*********************@z14g2000cwz.googlegroups. com>,
the lovely and talented Denebola
broadcast on comp.lang.php:
我希望能够在我的电脑上玩一些PHP脚本
而无需支付公司来托管域名。
我已经将php下载到我的电脑上,至少我认为我有一个名为php的文件夹已经出现在我的C:驱动器上,我已经下载并安装了Abyss Web服务器并且这看似有效。我还将HTML Kit作为我的html编辑器。
如何让简单的PHP脚本在我的电脑上正常工作?我在哪里保存文件?


您可以从命令行运行php。如果你被困在像Windows这样的GUI中,我不知道你怎么做这个呢?但是如果你可以

到达命令行提示符(并假设php在你的路径)

只需输入


php yourscript.php


其中yourscript.php当然是一些脚本你写了。


将输出重定向到你喜欢的地方:


php yourscript.php> mydoc.html

我知道这对某些人来说可能听起来如此简单,但是我在阅读php手册时感到非常头疼,坦率地说,我不明白其中的一半。
I want to be able to play around with some php scripting on my pc
without paying a company to host a domain. I have downloaded php onto my pc, at least I think I have, a folder
called php has appeared on my C: drive, and I have downloaded and
installed the Abyss web server and that appears to be working. I also
have HTML Kit as my html editor. How do I get simple php scripts to work properly on my pc though? Where
do I save the files?
You can run php from the command line. I have no idea how you
do this if you are stuck in a GUI like Windows, but if you can
reach a command line prompt (and assuming php is in your path)
simply enter

php yourscript.php

where yourscript.php is, of course some script you have written.

redirect the output where you please:

php yourscript.php > mydoc.html
I know this may sound so simplistic to some, but I''m getting a real
headache reading the php manual, frankly I don''t understand half of it.




我建议你不要立即尝试生成html页面。


试着搞定

<?php

echoHello,World!";

?>


先运行。


-

Lars Eighner 我们*** *@larseighner.com http://www.larseighner.com/

快速,便宜,好:选择任意两个。



I suggest you do not try to generate html pages immediately.

Try to get

<?php
echo "Hello, World!";
?>

to run first.

--
Lars Eighner us****@larseighner.com http://www.larseighner.com/
Fast, Cheap, Good: Choose any two.


继续Denebola的消息。 。 。
Following on from Denebola''s message. . .
我希望能够在我的电脑上玩一些PHP脚本
而无需支付公司来托管域名。

我已经下载了php到我的电脑,至少我认为我有一个名为php的文件夹已经出现在我的C:驱动器上,我已经下载并安装了Abyss网络服务器,这似乎正在运行。我还有HTML套件作为我的html编辑器。

如何让简单的PHP脚本在我的电脑上正常工作?我在哪里保存文件?

我知道这对某些人来说听起来可能过于简单了,但是我在阅读php手册时感到非常头疼,坦白说我不喜欢理解它的一半。
I want to be able to play around with some php scripting on my pc
without paying a company to host a domain.

I have downloaded php onto my pc, at least I think I have, a folder
called php has appeared on my C: drive, and I have downloaded and
installed the Abyss web server and that appears to be working. I also
have HTML Kit as my html editor.

How do I get simple php scripts to work properly on my pc though? Where
do I save the files?

I know this may sound so simplistic to some, but I''m getting a real
headache reading the php manual, frankly I don''t understand half of it.



1.获取简单的html页面显示(服务器将定义一个根目录

- 你需要阅读那些docs - 至少需要半个小时。)

*在执行此操作时,服务器文档应告诉您如何启动

并在执行时执行php解释器遇到一个.php文件请求。*


2.编写helloworld.php并将其放在同一个目录中作为工作的html页面

<?php print (Hello world); ?>


3.放入 http:// localhost / helloworld.php (等)进入你的浏览器和

Bob'是你的叔叔。


这个障碍在第1步中带有星号位我从来没有听说过深渊 - 如果

你可以(并且可能有充分的理由说明你不能)使用Apache。


-

彼得福克斯海报业务走到墙上不一样
pe ****** @ eminent.demon.co.uk.not.this.bit.no.html

2 T恤关闭,埃塞克斯郡Witham。

埃塞克斯的重力啤酒< http://www.eminent.demon.co.uk>


1. Get plain html pages to show (The server will define a root directory
- you need to read those docs - Will take at least half an hour.)
*While doing this the server docs should tell you how to get it to start
and execute the php interpreter when it encounters a .php file request.*

2. Write helloworld.php and put it in same dir as a working html page
<?php print("Hello world"); ?>

3. Put http://localhost/helloworld.php (etc) into your browser and
Bob''s your uncle.

The snag is with starred bit in step 1. I''ve never heard of Abyss - If
you can (and there may be good reasons why you can''t) use Apache.

--
PETER FOX Not the same since the poster business went to the wall
pe******@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>




" Denebola" < SI *** @ minnican.co.uk> écritdansle message de

news:11 ********************* @ z14g2000cwz.googlegro ups.com ...

"Denebola" <si***@minnican.co.uk> a écrit dans le message de
news:11*********************@z14g2000cwz.googlegro ups.com...
我希望能够在我的电脑上玩一些php脚本
而无需支付公司来托管域名。

我已将php下载到我的电脑上,至少我认为我有一个名为php的文件夹已经出现在我的C:驱动器上,我已经下载并安装了Abyss Web服务器,这似乎正在运行。我还有HTML套件作为我的html编辑器。

如何让简单的PHP脚本在我的电脑上正常工作?我在哪里保存文件?

我知道这对某些人来说听起来可能过于简单了,但是我在阅读php手册时感到非常头疼,坦白说我不喜欢不了解它的一半。

问候
I want to be able to play around with some php scripting on my pc
without paying a company to host a domain.

I have downloaded php onto my pc, at least I think I have, a folder
called php has appeared on my C: drive, and I have downloaded and
installed the Abyss web server and that appears to be working. I also
have HTML Kit as my html editor.

How do I get simple php scripts to work properly on my pc though? Where
do I save the files?

I know this may sound so simplistic to some, but I''m getting a real
headache reading the php manual, frankly I don''t understand half of it.

Regards




您可以在PC上安装Easyphp或Wamp服务器。很容易。安装它

它的工作原理。


Georges



You can install Easyphp or Wamp server on you''re PC. Very easy. Install it
and it works.

Georges


这篇关于我怎样才能在我的电脑上试验php?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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