| #./configure --enabled-shared-pdflib #make #make install |
| #./configure --with-apxs=/usr/bin/apxs --with-gd --with-pdflib=/usr/local --with-mysql=/usr/local --with-config-file-path=/etc/httpd --with-zlib-dir=/usr --with-ttf=/usr/local/include --with-jpeg-dir=/usr --with-tiff-dir=/usr --with-system-regex=yes --enable-debug=no #make #make install |
| create table catalogue( id smallint(8) unsigned DEFAULT '0' NOT NULL, item varchar(100) DEFAULT '' NOT NULL, description tinytext, img_data longblob, imgname varchar(60), imgsize varchar(60), imgtype varchar(60), price smallint(8) unsigned DEFAULT '0' NOT NULL, PRIMARY KEY (id), KEY item (item(20)) ); |
| header( "Content-type: application/pdf" ); header( "Content-Disposition: attachment; filename=modulo.pdf" ); header( "Content-Description: PHP Generated Data" ); |
| <?php $link = mysql_connect ("127.0.0.1", "flyadm", "flystore") or die ("Could not connect"); mysql_select_db ("flystore", $link); $result = mysql_query ("SELECT * FROM catalogue", $link) or die ("Invalid query"); $data = mysql_fetch_row ($result); …… …… mysql_close ($link); ?> |
用户评论