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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
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

Pull Requests

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: Sat Dec 21 14:01:32 2024 UTC