Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [PEAR-QA] Re: [PEAR-CVS] cvs: pear /Image_Barcode ChangeLog Readme.txt barcode_img.php package.x
On 5/25/05, Stephan Schmidt <schst@php-tools.net> wrote:
> Hi,
>=20
> Daniel Convissor schrieb: 
the 
and 
> Please don't use file_exists(), as it does not check in your include
> path. Using @include_once is IMHO the only way to achieve what he's
> trying to do.
>=20

Except that this stops all errors, including file not found (which you
can "fix" by raising an error if the call fails), but parse errors in
the included file cause the script to die without any error or
response.

file_exists can still be used, but the code has to loop through the
include_path to check for the file.

OR

You can use something like this, as long as you don't worry about
allowing users to put their drivers in their own directories.

include_once(dirname(__FILE__).'/drivers/'.$driver.'.php');

OR

you can say to hell with "file not found" errors and use include_once
without the @. IMHO attempting to include a driver which does not
exist is a pretty fatal error anyway. If someone doesn't want these
errors showing up they can easily set display_errors or
error_reporting to 0.

--=20
Justin Patrin

Report this thread to moderator Post Follow-up to this message
Old Post
Justin Patrin
05-27-05 01:57 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP PEAR Questions and Answers archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:23 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.