'和'之间的区别 [英] difference between ' and "

查看:136
本文介绍了'和'之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我花了几个小时寻找一个bug,直到我终于发现问题如下:


正确:$ path_upload =" $ path / $ file";


而不是:


错误:$ path_upload =''$ path / $ file '';


注意引号的差异。由于我一直在用
PHP进行编程,我发现''和'之间的区别很小,

但有人可以解释我,何时到使用''以及何时使用'b $ b使用'。如果有人向我解释这个

会非常棒!


谢谢,

Jochem

Today I spent a couple of hours searching for a bug, until I finally
found out that the problems was the following:

Correct: $path_upload = "$path/$file";

Instead of:

Wrong: $path_upload = ''$path/$file'';

Note a difference in quotation marks. Since I have been programming in
PHP I found out that there is very little difference between '' and ",
but is there somebody who can explain me, when to use '' and when to
use ". It would be really great if there is somebody to explain this
to me!

Thanks,
Jochem

推荐答案

path_upload ="
path_upload = "


path /


file" ;;


而不是:


错误:
file";

Instead of:

Wrong:


这篇关于'和'之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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