php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7413 Odd behavior
Submitted: 2000-10-23 12:04 UTC Modified: 2000-12-30 20:16 UTC
From: ignacio at openservices dot net Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.0.1pl2 OS: Red Hat Linux 6.2/7.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ignacio at openservices dot net
New email:
PHP Version: OS:

 

 [2000-10-23 12:04 UTC] ignacio at openservices dot net
Not so much a problem as a quirk.

Code:
"""
<?php
$jssrc="menu.js";
if (isset($jssrc))
{ ?>
<script src="<?=$jssrc?>">
<!--
//-->
</script>
<?php
};
?>
"""

Output:
"""
<script src="menu.js">

<!--
//-->

</script>
"""

Notice the extra nl's. Also, could somebody verify that this quirk still exists in later versions of PHP? I'm still having trouble building any of them, but don't worry about that. Thanks.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-24 08:00 UTC] lyric@php.net
My latest CVS produces :

"""
<script src="menu.js">
<!--
//-->
</script>
"""


Your problem is possibly related to DOS/Win carriage-returns & line feeds. Try saving your file in "unix mode" before putting on the (unix?) web-server.
 [2000-10-24 08:00 UTC] lyric@php.net
My latest CVS produces :

"""
<script src="menu.js">
<!--
//-->
</script>
"""


Your problem is possibly related to DOS/Win carriage-returns & line feeds. Try saving your file in "unix mode" before putting on the (unix?) web-server.
 [2000-10-24 12:00 UTC] ignacio at openservices dot net
I put in ":set fileformat=unix" and saved it.

Result: Nada. Same old same old.
 [2000-11-27 10:02 UTC] sniper@php.net
Is this still happening with latest snapshot?

--Jani
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Sep 26 06:01:23 2020 UTC