I am a newbie in php and I have a problem in getting another script to run in my code. The script I want to run are in the same folders but the one being included are in a folder four levels below.please help me. My directory tree is as shown below.
websystem\-
|-Administrator\
|-vehicle_details\vehicles\aston_martin\index.php
|-explore-vehicle.php
require(".../websystems/explore-vehicle.php");
I have written my code above but it doesn’t seem to run the script. asuming my home directory is aston_martin, I want to run the script explore-vehicle.php four levels below. My directory is \websystems\vehicles_details\vehicles\aston_martin\index.php and I want to run a script in \websystems\explore-vehicle.php.
You probably want something along the lines of (assuming you’re on the
index.phppage inaston_martin):If you need to change a different directory, other than just the one you end up in, you could do that, e.g: