Rule Definition
It is highly advised to try to minimize relative paths for files inclusion. The general mechanism for relative path inclusion will search for default include paths, then continue with current directory then so on. So file search in that case may take more time.
If however you need to use relatives path, the better practice is to declare the constant called WEB_ROOT which defines the root.
Remediation
Try to limit relative path without using the constant WEB_ROOT.
Violation Code Sample
<?php
include "../A.php"; //violation
?>
Fixed Code Sample
<?php
include $APPROOT."../A.php"; //violation removed
?>
Related Technologies
Technical Criterion
Efficiency - Memory, Network and Disk Space Management
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.