swf_closefile -- Close the current Shockwave Flash file
Syntax
void swf_closefile ( [int return_file] )
Close a file that was opened by the
swf_openfile() function. If the
return_file parameter is set then the contents
of the SWF file are returned from the function.
Example 1.
Creating a simple flash file based on user input and outputting it
and saving it in a database
<?php
// The $text variable is submitted by the // user
// Global variables for database // access (used in the swf_savedata() function) $DBHOST = "localhost"; $DBUSER = "sterling"; $DBPASS = "secret";
$data ? swf_savedata($data) : die("Error could not save SWF file");
// void swf_savedata(string data) // Save the generated file a database // for later retrieval function swf_savedata($data) { global $DBHOST, $DBUSER, $DBPASS;
$dbh = @mysql_connect($DBHOST, $DBUSER, $DBPASS);
if (!$dbh) { die (sprintf("Error [%d]: %s", mysql_errno(), mysql_error())); }
$stmt = "INSERT INTO swf_files (file) VALUES ('$data')";
$sth = @mysql_query($stmt, $dbh);
if (!$sth) { die (sprintf("Error [%d]: %s", mysql_errno(), mysql_error())); }
swf closefile php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online
Php swf closefile syntax tutorial
php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.