Kiewee123 Posted August 30, 2008 Share Posted August 30, 2008 Can't seem to get this to work, I've done something wrong with the html tags I think. Keep getting this: Parse error: syntax error, unexpected '<' in blahblah.php on line 3 <?php $url = $_GET['url']; <object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="NaN" height="NaN" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab"> <param name="src" value="$url" /> <embed type="video/divx" src="$url" width="730" height="420" pluginspage="http://go.divx.com/plugin/download/"> </embed> </object> ?> Can some kind soul help? Quote Link to comment https://forums.phpfreaks.com/topic/121941-help-with-really-simple-script/ Share on other sites More sharing options...
DeanWhitehouse Posted August 30, 2008 Share Posted August 30, 2008 <?php $url = $_GET['url']; ?> <object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="NaN" height="NaN" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab"> <param name="src" value="<?php echo $url;?>" /> <embed type="video/divx" src="<?php echo $url;?>" width="730" height="420" pluginspage="http://go.divx.com/plugin/download/"> </embed> </object> Quote Link to comment https://forums.phpfreaks.com/topic/121941-help-with-really-simple-script/#findComment-629344 Share on other sites More sharing options...
matthew798 Posted August 30, 2008 Share Posted August 30, 2008 the above post is 100% correct. But i will fill in the lack of explanation (no hard feelings) The scripts executes and reports the first and ONLY the first syntax error it finds. This is because it kills itself as soon as it finds an error and dumbs the log. You had to end the php with the "?>" tag BEFORE you started coding in HTML because the server is expecting everything between "<?php" and "?>" to be PHP, and any other languages have to be outside of these tags! Hope you understand!! Quote Link to comment https://forums.phpfreaks.com/topic/121941-help-with-really-simple-script/#findComment-629346 Share on other sites More sharing options...
DarkWater Posted August 30, 2008 Share Posted August 30, 2008 I kind of laughed at: ...it kills itself as soon as it finds an error.. I really lol'd. Quote Link to comment https://forums.phpfreaks.com/topic/121941-help-with-really-simple-script/#findComment-629349 Share on other sites More sharing options...
Fadion Posted August 30, 2008 Share Posted August 30, 2008 You had to end the php with the "?>" tag BEFORE you started coding in HTML because the server is expecting everything between "<?php" and "?>" to be PHP, and any other languages have to be outside of these tags! Hope you understand!! That is true obviously, but just to note that in a pure php script, a closing tag can be omitted as the interpreter knows when a script is finished even without it. That can be applied to included files for example. Even though, in a mix of php and html, closing tags are mandatory. Quote Link to comment https://forums.phpfreaks.com/topic/121941-help-with-really-simple-script/#findComment-629361 Share on other sites More sharing options...
DeanWhitehouse Posted August 30, 2008 Share Posted August 30, 2008 Another way to do it <?php $url = $_GET['url']; echo '<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="NaN" height="NaN" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab"> <param name="src" value="'.$url.'" /> <embed type="video/divx" src="'.$url.'" width="730" height="420" pluginspage="http://go.divx.com/plugin/download/"> </embed> </object>'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/121941-help-with-really-simple-script/#findComment-629365 Share on other sites More sharing options...
matthew798 Posted August 30, 2008 Share Posted August 30, 2008 hehehe dark, i had just been tinkering with cmd and "killing" processes so i thought it sounded appropriate Quote Link to comment https://forums.phpfreaks.com/topic/121941-help-with-really-simple-script/#findComment-629380 Share on other sites More sharing options...
DarkWater Posted August 30, 2008 Share Posted August 30, 2008 hehehe dark, i had just been tinkering with cmd and "killing" processes so i thought it sounded appropriate Ewwwww, cmd is Windows. *Dies* Quote Link to comment https://forums.phpfreaks.com/topic/121941-help-with-really-simple-script/#findComment-629383 Share on other sites More sharing options...
Fadion Posted August 30, 2008 Share Posted August 30, 2008 Ewwwww, cmd is Windows. *Dies* I remember you're totally anti-windows. So, you feel bad when you hear: program files, system32, autoexec.at. LOOL EDIT: That should have been autoexec.bat, not .at. Quote Link to comment https://forums.phpfreaks.com/topic/121941-help-with-really-simple-script/#findComment-629395 Share on other sites More sharing options...
DarkWater Posted August 30, 2008 Share Posted August 30, 2008 Ewwwww, cmd is Windows. *Dies* I remember you're totally anti-windows. So, you feel bad when you hear: program files, system32, autoexec.at. LOOL Ahhhh, autoexec. D: Anyway, thread starter, is this problem all sorted out? If it is, please click Solved on the bottom-left corner of the thread so it helps people find the answers in searches more easily. Quote Link to comment https://forums.phpfreaks.com/topic/121941-help-with-really-simple-script/#findComment-629397 Share on other sites More sharing options...
DeanWhitehouse Posted August 30, 2008 Share Posted August 30, 2008 And also it stops the threads going to far off topic. Quote Link to comment https://forums.phpfreaks.com/topic/121941-help-with-really-simple-script/#findComment-629400 Share on other sites More sharing options...
Kiewee123 Posted August 30, 2008 Author Share Posted August 30, 2008 It worked Thanks guys. Quote Link to comment https://forums.phpfreaks.com/topic/121941-help-with-really-simple-script/#findComment-629619 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.