SoFunction
Updated on 2025-04-09

Add dynamic flash file generation support for php4

Have you imagined dynamically generating flash animations on the website? This article will let you enter the exciting era of php+flash.

PHP is such a good thing, I really can't predict how she will change tomorrow. . . OK, let's get back to the point, here's it

Introduce how to implement this function.

1. The required software

Swf support library

/grafica/flash/dist.

There are documentation in this package, you can use c to use it, his example is.

This guy is so nice, but it would be even better if he provided the source code.

And of course it's php4 from

2. Installation

1. Installation

#cp dist. /usr/local

#tar xvzf dist.

#cd dist

#make

You will see the example C program generated and two files, which you can put in the browser to see the results.

If it comes out, you are half done.

There are some more things you need to do

Add in /etc/profile

SWFBINPATH=/usr/local/dist/bin

export SWFBINPATH

SWFFONTPATH=/usr/local/dist/fonts

export SWFFONTPATH

2. Compile php4

Compile and join

--with-swf=/usr/local/dist

When I compiled, I found that the error could not be found.

#cp /usr/local/dist/ /php/src/directory/ext/swf solves the problem

After installation, make the following script (example in the php document). Please note that the swf directory in the current directory must be OK.

Write, otherwise apache will make mistakes and you will not be able to do anything.

After executing, you will definitely be surprised by the power of php.

Experience the perfect feeling of programming and artistic 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 supported

Graphic format, pstomoff is to convert ps fonts into available fonts. I have converted English fonts and can be used in the program

It is used, but the Chinese font has not been successfully converted. I don’t know which big shrimp has succeeded and can I report it.

For the description of swf's php function, please go to the latest manual.