PHP File Linux vs. Windows

From CoderLearner
Jump to: navigation, search

PHP File for Linux Vs. Windows

Access file in Linux OS is different from Windows OS.

Example 1:Windows

This is how to access a file in Windows environment.

C:\\directory\file.txt

$window = fopen("c:\\direct\file.txt",'r');

Example 2:Linux/Unix

This is how you can access a file in Linux environment.

/directory/directory/file.txt

$linn = fopen("/direct/file.txt",'r');