Jump to content

fayne

New Members
  • Posts

    2
  • Joined

  • Last visited

fayne's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have a page where a user can change a date and it works with on input button that starts the following script. This works perfectly on a computer with internet explorer or safari. And even works on a android tablet. The only problem is that it doesn't work on an ipad. Does anyone here know how to change this, so that is also works on an ipad? function ChangeDate(id, date) { $.ajax({ type: "POST", url: "changedate.php", data: 'id='+id+'&date='+date, cache: false, success: function(data){} }); }
  2. Hello, I have a page where users can insert pdf-document into my mssql database. The selected pdf get converted with the following lines and then inserted into a image column in my mssql database. $filename = $_FILES["pdf"]["tmp_name"]; $datastring = file_get_contents($filename; $arrdata = unpack("H*hex", $datastring); $content = "0x".$arrdata['hex']; Now on another page the user can view the pdf they inserted into the database with the following code; $query = odbc_exec($conn, "SELECT name, size, type, document FROM documents WHERE id='". $id ."'"); while (odbc_fetch_row($query)) { $filename = odbc_result($query,"name"); $filesize = odbc_result($query,"size"); $filetype = odbc_result($query,"type"); $filedata = odbc_result($query,"document "); header("Content-Length: ". $filesize .""); header("Content-Type: ". $filetype .""); header("Content-Disposition: attachment; filename=". $filename .""); echo $filedata; } This is all working perfectly with pdf files below 500kb. But once a pdf document exceeds the 500kb I get an error downloading the pdf file with the above script. And the pdf-document gets inserted right because from my vb.net tool I still can open the pdf-document from the mssql database. Is there some kind of limit in php that when a file exceeds 500kb he won't show/download it? Can someone explain me how I can adjust this so that pdf documents that are bigger then 500kb still can be opened from the php page?
×
×
  • Create New...

Important Information

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.