is_file() in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dduleep
Forum Newbie
Posts: 3
Joined: Tue May 25, 2010 12:46 am

is_file() in php

Post by dduleep »

i have file /home/duleep/a.mp3 that have 777 permission but i
<?
echo ("/home/duleep/a.mp3");
?>
not print anything in code
aravona
Forum Contributor
Posts: 347
Joined: Sat Jun 13, 2009 3:59 pm
Location: England

Re: is_file() in php

Post by aravona »

I think you need to readup on echo.

http://www.w3schools.com/php/func_string_echo.asp

You cant echo a sound file. At least, you cannot as far as I know.
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: is_file() in php

Post by AbraCadaver »

You'll need to set the proper headers and then:

Code: Select all

readfile("/home/duleep/a.mp3");
And why is is_file() in the subject of this post???
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Post Reply