Proper Way To Include PEAR CSV Extension

Posted on 2011-10-04
Last Modified: 2012-05-12

I've been using this function for a year now. It does work I know that but occasionally, someone has issues with it on their server.

I'm just wondering if anyone can spot an issue or can suggest a better approach. This approach is far older than a year so I thought it might be worth a try.

function wtgpt_pearcsv_include(){
    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'){
    require_once 'File/CSV.php';

Open in new window

Question by:Ryan Bayne
    LVL 107

    Accepted Solution

    someone has issues

    Who, what issues?  It looks like the only difference between the function calls is a semi-colon vs a colon.
    LVL 2

    Author Comment

    by:Ryan Bayne
    Customers. Information is vague, I would need access to their hosting php ini. This question is in response to a year of use on my software.

    If you think it looks good then I'm sticking with it. I'm just checking because I was still really new to PHP when I started using this.


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now