使用DW创建PHP站点、编写PHP程序的方法

你好! Having said that, that year in Wuhan, I used Dreamweaver to create a PHP website, which really gave me a headache at the time.我记得当创建一个新网站时,点击这里那里,我差点晕倒。

At that time, I first looked for the "Site" menu in Dreamweaver, then scrolled down and found "New Site". Enter the name of the site, called "MyPHPSite" and set the local folder path, which is the htdocs folder.这一步很简单,关键在下面。

Next, click on the "Servers" tab, add a server configuration, fill in the server name and randomly call it "LocalPHP". Then I chose "Local/Network" as the connection method because it is in beta. The server directory is the same as the website directory, both are htdocs. WebURL 我填写的是“http://1 2 7 .0.0.1 /”。

Then switch to the "Advanced" tab and select "PHPMySQL" as the "Server Model". I paid special attention to this because I was using PHP at the time and had to choose this.最后保存,配置就完成了。

To write a PHP program, I created a new PHP file called index.php.在 Dreamweaver 代码编辑器中编写代码。
记得安装本地PHP环境,例如XAMPP。
After writing the code, press the F1 2 key, the browser will automatically run, very convenient.
Note, I must remind you to ensure that the local server and PHP are running properly. The path of the website directory and the server directory must be the same to avoid file reference problems. The server model also needs to be aligned with the actual development language.
Now that I think back, I actually encountered a lot of pitfalls at that time, but finding them was quite interesting. If you also use Dreamweaver to do PHP, you can refer to my experience. However, at that time, I hadn't watched any "Dreamweaver Tutorials" or "PHP Video Tutorials" and I had to figure it out on my own.呵呵,希望这有帮助!

phpstudy使用方法详细图文教程

1 、phpstudy的安装:从官网下载并安装在盘符根目录下​​。
启动后,状态栏显示“正在运行”表示成功。
2 .手动启动MySQL:Win+R,cd到MySQL bin目录,netstartmysql,重新加载phpstudy并验证。
3 、配置域名和端口:phpstudy控制台,填写域名、目录和端口,保存后自动配置。
4 、修改Hosts文件:管理员打开C:\Windows\System3 2 \drivers\etc\hosts,添加域名1 2 7 .0.0.1 5 、测试网站:创建索引,用浏览器访问域名,成功显示内容。
6 . PHP项目:.php文件扩展名,Apache启用PHP模块。
7 、端口冲突:修改Apache phpstudy配置文件上的Listen端口。
8 、权限问题:确保网站目录的读写权限。
9 .环境转换:在phpstudy控制台的PHP选项卡中选择版本。

称一下体重。

PHP数组值中去除空格的实用教程

结论:可以通过三种方法从 PHP 数组中删除空格。

方法一:遍历数组,用str_replace替换空格。

项目:$originalArray; 时间:立即; 数量:无要求。

方法二:array_map匿名函数,一次性处理。

项目:$originalArray; 时间:立即; 数量:无要求。

方法三:preg_replace,处理各种空格字符。

项目:$originalArray; 时间:立即; 数量:无要求。

自己掂量一下。