Menu
HI
Suppose I have a php file “read_file.php” that is used to read .txt files, the structure of the folder/files are:
/www/read_file.php
/www/public/upload/
I was wondering which will be faster and why in PHP..
[B]Method 1:
read file using relative path
Eg: get_file_contents(“public/upload/test.txt”);
[B]Method 2:
read file using URL (note that the server which is making the request and the server where the file is being read is same)
Eg: get_file_contents(“
Can someone explain me which is faster and why?
Thanks