PHP文件怎么样打开和运行
<div style="color: black; text-align: left; margin-bottom: 10px;">
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">针对</span>刚学习PHP编程语言的小伙伴们<span style="color: black;">来讲</span>,<span style="color: black;">怎么样</span>打开和运行PHP文件是一件比较麻烦的事情,今天我就来教教<span style="color: black;">大众</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">工具</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">电脑</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">xampp</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">PHP文件</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">操作<span style="color: black;">办法</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">01</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">如图,后缀名为.php的文件<span style="color: black;">便是</span>PHP文件,接下来我就<span style="color: black;">来讲</span>说<span style="color: black;">怎么样</span>打开和运行它。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">02</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">打开PHP文件比较简单,直接在PHP文件上面单击鼠标右键,<span style="color: black;">而后</span>打开方式选择电脑自带的“笔记本”就<span style="color: black;">能够</span>打开了。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">03</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">如图所示,PHP文件以<?php和?>包裹着PHP要执行的内容,图中echo<span style="color: black;">便是</span>一个输出语句。<span style="color: black;">咱们</span>打开PHP之后<span style="color: black;">能够</span>在<?php和?>写上要执行的内容。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">04</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">而执行运行PHP文件则要安装xampp,安装过程跟普通软件的<span style="color: black;">同样</span>,<span style="color: black;">详细</span>请搜索搜索。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/321b000047708fb36fb7~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728305850&x-signature=mnNVXiMxX7dMPmK1fUxGDG0wgSA%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p26-sign.toutiaoimg.com/320d00039767bf78222b~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728305850&x-signature=gx1vrXgpzC8K6BT3S4OsOPfnZWM%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/3229000334bf8c92a06d~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728305850&x-signature=I8%2Fw%2FS97ktGabeHGVf6bxhjwH1I%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/322a0001a6c4cb13fe81~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728305850&x-signature=jMks80aHs8NjaiIYjrsdVo1yAOI%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/3229000334c0abc58718~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728305850&x-signature=5CIBvPGwnjjbM7oFS%2B8zdaIMm6c%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">05</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">之后<span style="color: black;">咱们</span>运行xampp,<span style="color: black;">而后</span><span style="color: black;">起步</span>Apache和MySQL,点击start<span style="color: black;">就可</span><span style="color: black;">起步</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">06</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">接着<span style="color: black;">咱们</span>再在xampp快捷方式图标上单击鼠标右键,点击“打开文件位置”。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/320e00003a1c246c7c39~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728305850&x-signature=8phDjd0JeXneDOHweJY5CX3rPxU%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">07</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span>在文件位置<span style="color: black;">这儿</span>找到htdocs文件夹,并且点击进入文件夹。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">08</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span>在复制粘贴<span style="color: black;">咱们</span>之前的PHP文件进来,如图所示。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">09</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">之后,再打开浏览器,在<span style="color: black;">位置</span>栏中输入 localhost/xxx.php,xxx<span style="color: black;">暗示</span>的是你的PHP文件的名字。<span style="color: black;">例如</span>我的是sougou.php,则输入localhost/sougou.php。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/321b000047714fdaf53e~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728305850&x-signature=uTy8bQc51RJFdZ7enPDf4n9xdXM%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/322a0001a6c6e7ba6514~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728305850&x-signature=1GUyE3cfwGgE53KvP2yY6ELiI10%3D" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://p3-sign.toutiaoimg.com/3208000048a437412214~noop.image?_iz=58558&from=article.pc_detail&lk3s=953192f4&x-expires=1728305850&x-signature=Uya6VJLsn%2BiAEq%2BJ5NtZUS54KQ8%3D" style="width: 50%; margin-bottom: 20px;"></p>
</div>
论坛的成功是建立在我们诚恳、务实、高效、创新和团结合作基础上,我们要把这种精神传递下去。 楼主节操掉了,还不快捡起来! 论坛外链网http://www.fok120.com/
页:
[1]