Zubrag.com
May 21, 2012, 01:42:53 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: solved bug:(file downloade damage/conversion cause damage) i'ts strange  (Read 2007 times)
supana
Newbie
*
Posts: 1


« on: March 07, 2009, 09:44:47 am »

great thanks to zubrag

first thing first I,ve got a trouble in it but it has been solved Smiley

so my sugestion to user of zubrag-download script if theres a damage in your downloads  file(file remain conversion) when you use this download script( I've got ms word file damage when it used after it has downloaded). but here we go:

1. don't use "echo"  to check script is working, before and after this script
you can proof this by adding: echo"a"; in zubrag download script

it's mean if download.php  included in your index.php, theres must  no html tags or text buffered in browser
the way to use it is by suppressing all of buffered things is use "if"  while your download script included to supress any other buffereable things in browser.

example:
link to download script:
<a href='?page=download.asp&amp;vanish=1&amp;f=my file.doc'>download</a>

script in index:

if(empty($_GET[vanish]))
{
include (header.php);//------------>this file will be suppressed where this file buffered things to browser
include (body.php);//------------>this file will be suppressed where this file buffered things to browser
include (ect.php);//------------>this file will be suppressed where this file buffered things to browser
}
else
{
$a=$_GET['page'];
$b== str_replace(".asp","",$a);
$c=$b.'.php';
include ($c);//------------------------->this file will be used for download
}

and if you include another file in zubrag download file don't echo any nonempty value  or your download file will be damaged!!
so if you  make header,body,table,attach an  image, or etc..................... make it in an included file for your index.php
another way to make these included file is by make one base design  then separate it in several php

2.no empty space  in every line of  your included file for zubrag-download script

example:
1<?php
2$x=1;
3            empty line  will generate problem
4?>

or
1
2<?php
3$x=1;
4 ?>           
5     empty line  will generate problem

should be :

1<?php
2$x=1;
3?> 

and your index (where your index.php is your base file)file too if you include this download script   don't make an empty line
in other word you should separate your index file to a few php files to be included

3. if you include download script in your index file(where your index.php is your base file)
theres should be no more than one php  working  in one index.php  file
 example:

index.php
============================================
<?php
include (header.php);
?>
   <?php
include (body.php);
?>
   <?php
include (download.php);
?>
   <?php
include (ect.php);
?>
=============================================== 
altough theres no HTML tags in your php file




 
should be:
index.php
============================================
<?php
include (header.php);//------------>while this file not contain buffeered things
include (body.php);//------------>while this file not contain buffeered things
include (download.php);//------------>this file buffering download file
include (ect.php);//------------>while this file not contain buffeered things
?>
===============================================   



remember:no echo,no empty line and  no multi php working in index
the script feels so fragile-sensitive
you will think it's stupid but  I'TS WORK DUDE!!!!

suggest for zubrag:
if you still have great php blood  please refine your great download script   for my problem Smiley
arrange your comments page so the peple know how to trouble shoot

 but whatever

thankszalotts ZUBRAG!!!!!!!!!!!!!!!!

note:I'm very new in php .I'm is an indonesian so I'm sorry if theres bad words in my english Smiley








Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC