Home >Backend Development >PHP Tutorial >Add support for dynamic flash file generation to php4_PHP Tutorial

Add support for dynamic flash file generation to php4_PHP Tutorial

WBOY
WBOYOriginal
2016-07-20 11:03:56977browse

Source: wangzy
Have you ever imagined dynamically generating flash animation on a website? This article will let you step into the exciting era of php+flash.
php is such a good thing, I really can’t predict how she will change tomorrow. . . Okay, let’s get down to business, let’s
introduce how to implement this function.
1. Required software
SWF support library
http://reality.sgi.com/grafica/flash/dist.99.linux.tar.Z
This package contains documentation. You can use it with c, his example is.
This guy is great, but it would be better if he provided the source code.
Of course, php4 is obtained from http://www.php.net
2. Installation
1. libswf.a installation
#cp dist.99.linux.tar.Z / usr/local
#tar xvzf dist.99.linux.tar.Z
#cd dist
#make
You will see two image.swf and test.swf generated by the example c program file, you can put it in the browser to see the results.
If it comes out, you're halfway done.
You still need to do a few things
Add
SWFBINPATH=/usr/local/dist/bin to /etc/profile
export SWFBINPATH
SWFFONTPATH=/usr/local/dist/fonts
export SWFFONTPATH ​​
2. Compile php4
Compile and add
--with-swf=/usr/local/dist
The author found an error that swf.h could not be found when compiling. Use
#cp /usr/local/dist/swf.h /php/src/directory/ext/swf solve the problem
After installation, make the following script (example in the php document), please pay attention to the current directory The swf directory under the directory must be
writable, otherwise apache will error and you will not get anything.
After execution, use the browser to call the test.swf file. You will definitely be surprised by the power of php, haha
Experience the perfect feeling of programming and art design, but unfortunately I don’t have an artistic mind:-(
There are two programs in /usr/local/dist/bin, imgtofi is used to convert rgb, gif, jpg to libswf .a supports
graphic formats. pstoff converts ps fonts into fonts available in libswf.a. I have converted English fonts and they can be used in the program
, but I have not successfully converted Chinese fonts. I don’t know where. I succeeded, can you tell me?
For the php function description of swf, please go to php.net to find the latest manual.


http://www.bkjia.com/PHPjc/445249.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445249.htmlTechArticleSource: wangzy Have you ever imagined dynamically generating flash animations on a website? This article will let you step into the world of php+flash Exciting times. php is such a good thing, I really can’t predict how she will change tomorrow...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn