Question

I have a script which uses require_once, but it fails to actually include the file. I have ran a check and the code agrees that the file is in the right place, using the right paths. Do I need to configure anything extra? Is there a problem with my code?

if (is_file('lib/stripe/Stripe.php')){
    echo "Found file";
    require_once 'lib/stripe/Stripe.php';
    echo "Hello World";
}

else{
    echo "Failed to find file";
}

"Found file" is successfully returned, but "Hello World" isn't.

Was it helpful?

Solution

Error log showed that curl wasn't installed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top