php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #297 printing quotation mark read by fgets-function
Submitted: 1998-04-21 22:57 UTC Modified: 1998-05-01 14:31 UTC
From: gihwaja at chollian dot net Assigned:
Status: Closed Package: Other
PHP Version: 3.0 Release Candidate 4 OS: SunOS 5.5.1
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: gihwaja at chollian dot net
New email:
PHP Version: OS:

 

 [1998-04-21 22:57 UTC] gihwaja at chollian dot net
Let's say that "quotation" file has only five quotation mark.
(that is, """"")
and execute following php-script

<?php
    $fp = fopen("quotation", "r");
    echo fgets($fp, 100);
?>

The result is
    \"\"\"\"\"
of length 10, not 5.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-05-01 14:31 UTC] jim
This is happening because you have magic_quotes_runtime
on in your configuration file. Either turn that off,
or run stripslashes() on the string before printing it.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 17:01:30 2024 UTC