Jump to content
xisto Community
Sign in to follow this  
farsiscript

File In Database Question.thanks

Recommended Posts

Hi all
i write this code i want when you see download.php (this code) my file goes for download for user
sorry my english is not very good
its a file database project for my university but when i browse this code my soruce file (.zip) echo in my page and dont goes for download
my next querstion about safe mode
i saw (php.net and zend) when safemode is on file databaseing and header() is not working . is it true ? if is it true i save my file at hosting and no (database) i want write standard script .
plz help me
thanks more and more

include("config.php");$kind = "id";$result = mysql_query("SELECT * FROM file WHERE $kind LIKE '$id'");while($r=mysql_fetch_array($result)){$software=$r["software"];$how=$r["how"];$text=$r["text"];$subject=$r["subject"];$size=$r["size"];$type=$r["type"];$name=$r["name"];$cat=$r["cat"];$content=$r["content"];}header("Content-length: $size");header("Content-type: $type");header("Content-Disposition: attachment; filename=$name.zip");echo $Content

Edited by farsiscript (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.