I have youtube video embedded to a php file. I keep uploading new youtube videos always because of this the link also keeps changing and also I need keep editing my php file always.
Instead what I thought was I could create a text file which will have the youtube link for the object and so the php file get the link from text and put in the required place accordingly.
To achieve the above idea below code is what I tried.
Code: Select all
<html>
<head>
<title>File read demo</title>
</head>
<body>
<?
$file = "/home/rambo/public_html/release/knot/text.txt";
$f = fopen($file, "r");
while ( $line = fgets($f, 1000) ) {
$a = $line;
print $a; (Just for Testing purpose)
}
<div align=center>
<object width="960" height="745"><param name="movie" value="<? print($line);?> &hl=en_US&rel=0&hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="<? print($line);?> &hl=en_US&rel=0&hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="670" height="600"></embed></object>
</div>
</body>
</html>I am not sure ifParse error: syntax error, unexpected '<' in /home/rambo/public_html/release/knot/test.php on line 14
Code: Select all
value="<? print($line);?>Please let me know the right syntax to solve this issue?
Awaiting your response!
Thanks!