Possible Duplicate:
What is the difference between the PHP open tags “<?=” and “<?php”/“<?”?
不是类型:
<?php echo $foo; ?>
I have seen it written
<?= $foo; ?>
但我常常想知道,这样做的风险/做法是什么? 公正。 感谢!
Possible Duplicate:
What is the difference between the PHP open tags “<?=” and “<?php”/“<?”?
不是类型:
<?php echo $foo; ?>
I have seen it written
<?= $foo; ?>
但我常常想知道,这样做的风险/做法是什么? 公正。 感谢!
如果您将守则移至short_ open_tag
的环境。 凭空,你可以找到许多内部变量名称(安全问题),并拥有大量受损产出。
另一边是,允许使用<代码><的相同术语? 同样,让你打开只有<代码><的PHP标签;,从而使其残疾不仅会暴露你试图展示的具体变量,而且会在短标内显示任何PHP代码。
第二种选择提高了可读性。 第一项确保了其他系统的可运输性。
除此以外,没有任何差别......
它不可运输。 有一个预设结构,可以将其撤销,这样,如果你把手稿移至残疾地点,就会打破。
此外,我认为,这不够明确。 <代码><?= func() ?> and <? func();?>
易于误解,但很重要。
You can only use <?
and <?=
if short tags are enabled when you are running PHP. The actual reason not to use it is because it s incompatible with an xml declaration. If you are trying to output xml with a php extension and you have short tags enabled, you have to do something like <<??>?
.. I suppose you can just echo a string.
我不理解所有这种便携式话。
There is ALWAYS a portability issue.
There can be no apache - so, don t use mod_rewrite.
There can be no PDO - so, don t use prepared statements.
There can be no mysql - so, don t use complex queries.
There can be no PHP - so, plain HTML is most compatible format, never use anything else because of portability issues!
I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...
<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...
I found this script online that creates a thumbnail out of a image but the thumbnail image is created with poor quality how can I improve the quality of the image. And is there a better way to create ...
如何确认来自正确来源的数字。
Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...
I wonder there is a way to post a message to a facebook business page with cURL? thanks
I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...
How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...