开发者

Can i use this statement

开发者 https://www.devze.com 2023-01-24 07:59 出处:网络
i this a valid command $fp = fopen($hyphen + \".html\",\"w\"); I ha开发者_运维技巧ve declared $hyphen already.But it doesn\'t seem to be workingstring concatenation in php works by using . (instead

i this a valid command

$fp = fopen($hyphen + ".html","w");

I ha开发者_运维技巧ve declared $hyphen already.But it doesn't seem to be working


string concatenation in php works by using . (instead of + like other languages use (java, javascript, c++ ...)), so you have to change your script to this:

$fp = fopen($hyphen . ".html","w");
                // ^^^ this has to be a dot, not a plus


Nope. Join the two parts of the filename using a dot instead of a plus sign, and it should work.


There is an error. Try:

$fp = fopen($hyphen . ".html","w");
0

精彩评论

暂无评论...
验证码 换一张
取 消