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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
39 - 3 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 17:01:29 2024 UTC