Friday, 15 April 2011

path - php fopen in ubuntu file systen -



path - php fopen in ubuntu file systen -

i want download file using php. working fine on windows, when seek run same php code on ubuntu 12.04 empty file gets downloaded without content. when seek run next code:

<?php $filename = '/root/my_folder/filename.pdf'; if(file_exists($filename)) $f = fopen( '/root/my_folder/filename.pdf', 'r') or exit('unable open file'); else echo 'file not exists'; ?>

it display 'file not exists'. issue setting path folder ? can help me this. i'm new in ubuntu. thanks

your apache user not hae permission access /root/myfolder/filename.pdf . have either add together apache user grouping accessing /root/myfolder or change ownership of filename.pdf or alter permissions on /root/myfolder

php path download ubuntu-12.04

No comments:

Post a Comment