Req #66518 [NEW]: need some exceptions for php's include or require
| From: | wolftankk at gmail dot com | Date: | Mon, 20 Jan 2014 09:24:54 +0000 |
| Subject: | Req #66518 [NEW]: need some exceptions for php's include or require | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-183909@lists.php.net to get a copy of this message | ||
From: wolftankk at gmail dot com
Operating system: Linux
PHP version: 5.5.8
Package: *General Issues
Bug Type: Feature/Change Request
Bug description:need some exceptions for php's include or require
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 {
}
--
Edit bug report at https://bugs.php.net/bug.php?id=66518&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66518&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66518&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66518&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66518&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66518&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66518&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66518&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66518&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66518&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66518&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66518&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66518&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66518&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66518&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66518&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66518&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66518&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66518&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66518&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66518&r=mysqlcfg