PHP Include: long path problem

When I try to include a long path to a file that PHP is not loading. The short inclusive path works fine.

For example, the following will fail:

../../contents/2010-St-Louis-Rams-Tickets-Season-Package-Includes-Tickets-For-All-Regular-Season-Home-Games/inc/title.inc

Does anyone know where there might be a problem?

+5
source share
2 answers

Please check if your path (including disk name, etc.) exceeds 260 characters. Because the maximum directory length for Windows. Click here to see the link .

, "\? \". 32767 . , PHP.

+1

symfony 1.x , :

require_once __DIR__ . '/../../../../bootstrap/unit.php';
require_once __DIR__ . '/../../../../../../../MY/LONG/PATH.php'

, /../../.. . , , .

symfony , sfConfig:: get ('sf_root_dir'), :

require_once __DIR__ . '/../../../../bootstrap/unit.php';
require_once sfConfig::get('sf_root_dir') . '/MY/LONG/PATH.php'

( ).

dir, symfony, - .

0

All Articles