Heim >Backend-Entwicklung >PHP-Tutorial >视频网站的制作例子二_PHP教程

视频网站的制作例子二_PHP教程

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-13 10:58:161439Durchsuche

 

Listing 4. simplemovie.mxml
<?xml version="1.0" encoding="utf-8"?>
<application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<vbox backgroundcolor="white" width="400" height="335">
  <videodisplay width="400" height="300" id="videoPlayer" source="{Application.application.parameters.movie}"></videodisplay>
  <hbox width="100%" horizontalalign="center">
    <button label="Play" click="videoPlayer.play()"></button>
  </hbox>
</vbox>
</application>
<h5>Listing 5. simptest.php</h5><pre class="brush:php;toolbar:false"><?php require "DB.php";

$moviebase = 'http://localhost:8080/movies/';

$dsn = 'mysql://root@localhost/movies';
$db =& DB::connect( $dsn );
if ( PEAR::isError( $db ) ) { die($db->getMessage()); }

$source = null;
$movieId = 1;
if ( array_key_exists( 'movie', $_GET ) )
  $movieId = $_GET['movie'];

$movies = array();
$res = $db->query( 'SELECT movieId, source, title FROM movies' );
while( $row = $res->fetchrow( ) ) {
  $movies []= $row;
  if ( $row[0] == $movieId )
    $source = $row[1];
}

if ( $source == null )
    $source = $movies[0][1];
?>



 

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/632018.htmlTechArticleListing 4. simplemovie.mxml ?xml version=1.0 encoding=utf-8?mx:Application xmlns:mx=http://www.adobe.com/2006/mxml layout=absolutemx:VBox backgroundColor=white width=400 height=335...
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn