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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 14:01:29 2024 UTC