php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #66518 need some exceptions for php's include or require
Submitted: 2014-01-20 09:24 UTC Modified: 2021-09-22 16:34 UTC
Votes:3
Avg. Score:3.7 ± 1.9
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: wolftankk at gmail dot com Assigned: cmb (profile)
Status: Wont fix Package: *General Issues
PHP Version: 5.5.8 OS: Linux
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: wolftankk at gmail dot com
New email:
PHP Version: OS:

 

 [2014-01-20 09:24 UTC] wolftankk at gmail dot com
Description:
------------
Hi,
We use include or require method for including a script file, it needs some exceptions.
EX.
1. This file is not exists. (also I can use file_exists for checking it)
2. This script file syntax errors, if it use @include a file, it will shutdown.(for file cache)

Test script:
---------------
try {
  $data = include('test.cache.php');
} catch (Exception $e) {
  print($e->getMessage()); //throw file dont exists or syntax errors
} finally {
  $data = false;
}

if (!$data) {
//do something
} else {

}


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-09-22 16:34 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-09-22 16:34 UTC] cmb@php.net
This is unlikely to happen; at least not without an RFC[1].  Feel
free to pursue the RFC process! :)

[1] <https://wiki.php.net/rfc/howto>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 01:01:28 2024 UTC