Unable to set PHP include_path

I have downloaded all my files in var / www / html and in one of my php files I have this line:

require_once('libraries/stripe/init.php');

The structure of my folders lists this:

www
 -html/
       -libraries
           -> Stripe -> init.php
       -register.php

I keep getting this error message:

Warning: require_once (libraries / Stripe / init.php): could not open the stream: there is no such file or directory in /var/www/html/register.php on line 116

Fatal error: require_once (): Failed to open the required libraries /Stripe/init.php(include_path = '.: / Usr / share / php: / var / www / html /') in / var / www / html / register. php on line 116

My php.ini file was used this way

include_path = ".: / usr / local / php / pear /"

but based on some answers here I changed it to

include_path = ': / usr / share / php: / var / www / html /'

but it does not work!

: index.php, :

<?php 
header("Location: ../"); die();
+4
2

:

require_once(__DIR__ . '/libraries/Stripe/init.php');

script, script.

Update

'/var/www/html/libraries/Stripe/init.php'

, ; - , . composer, (, , ).

, , Stripe "s", "S". , ?

Linux ( , ), Windows. , .

+4

, . , php.ini .

require_once "path/to/file";
+2

All Articles