victormenezes Posted October 16, 2013 Share Posted October 16, 2013 (edited) on my server is giving error:Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\postador\include\opcoes.php on line 68 my code is: I've changed the tags nothing happened can someone fix for me? <? $grupos = @simplexml_load_file("./xml/grupos.xml"); $grupoids = @explode(',', $grupos->ids); if (file_exists("./xml/usuarios/id_{$id}.xml")){ // Carregando configurações XML $config = simplexml_load_file("./xml/usuarios/id_{$id}.xml"); } $portais_array = array('3', '6'); ?> <form id="s_config" action="index.php?act=opcoes_ret" method="post"> <dl><dt>Configure seu Gerador</dt> <dd id="dados-left"> <label for="outrasinfo">1 - Outras Informações:</label> <?php if ($config->outrasinfo == 1){?><input type="checkbox" name="outrasinfo" id="outrasinfo" value="<?=$config->outrasinfo;?>" checked="checked" /><? } else {?> <input type="checkbox" name="outrasinfo" id="outrasinfo" value="1" /><?}?> <br /> <label for="youtube">2 - Link Youtube:</label> <?php if ($config->youtube == 1){?> <input type="checkbox" name="youtube" id="youtube" value="<?=$config->youtube;?>" checked="checked" /><? } else {?> <input type="checkbox" name="youtube" id="youtube" value="1" /><?}?> <br /> <label for="quatroscreens">3 - Quatro ScreenShots:</label> <?php if ($config->quatroscreens == 1){?> <input type="checkbox" name="quatroscreens" id="quatroscreens" value="<?=$config->quatroscreens;?>" checked="checked" /><? } else {?> <input class="checkbox" type="checkbox" name="quatroscreens" id="quatroscreens" value="1" /><?}?> <br /> <label for="curiosidades">4 - Curiosidades:</label> <?php if ($config->curiosidades == 1){?> <input type="checkbox" name="curiosidades" id="curiosidades" value="<?=$config->curiosidades;?>" checked="checked" /><? } else {?> <input type="checkbox" name="curiosidades" id="curiosidades" value="1" /><?}?> <br /> <label for="premiacoes">5 - Premiações:</label> <?php if ($config->premiacoes == 1){?> <input type="checkbox" name="premiacoes" id="premiacoes" value="<?=$config->premiacoes;?>" checked="checked" /><? } else {?> <input type="checkbox" name="premiacoes" id="premiacoes" value="1" /><?}?> <br /> </dd> <dd id="dados-right"> <label for="imglanc">1 - Imagem de Lançamento:</label> <input type="text" name="imglanc" id="imglanc" size="37" value="<?=$config->imglanc;?>" /> <br /> <?if (in_array($id, $grupoids)){?> <label for="portais">2 - Portais:</label> <select name="portais" id="portais"> <option value="">Selecione</option> <? foreach ($portais_array AS $portais){ if ($config->portais == $portais){ echo ("<option value=\"{$portais}\" selected=\"selected\">{$portais}</option>"); } else { echo ("<option value=\"{$portais}\">{$portais}</option>"); } }?> </select> <?}?> </dd> </dl> <dl class="enviar-d"><dd><input type="submit" value="Salvar" /></dd></dl> </form> Edited October 16, 2013 by victormenezes Quote Link to comment https://forums.phpfreaks.com/topic/283030-what-is-wrong-with-this-code-2/ Share on other sites More sharing options...
Barand Posted October 16, 2013 Share Posted October 16, 2013 How many more topics do you intend to create with this problem? Quote Link to comment https://forums.phpfreaks.com/topic/283030-what-is-wrong-with-this-code-2/#findComment-1454195 Share on other sites More sharing options...
victormenezes Posted October 16, 2013 Author Share Posted October 16, 2013 I think only 1 more can help me I've changed the tags you can fix this code please? Quote Link to comment https://forums.phpfreaks.com/topic/283030-what-is-wrong-with-this-code-2/#findComment-1454197 Share on other sites More sharing options...
requinix Posted October 16, 2013 Share Posted October 16, 2013 I've changed the tags nothing happenedFor the worse. It's supposed to be <?php and not . Quote Link to comment https://forums.phpfreaks.com/topic/283030-what-is-wrong-with-this-code-2/#findComment-1454202 Share on other sites More sharing options...
victormenezes Posted October 17, 2013 Author Share Posted October 17, 2013 I already changed it you can give me the code ready to not have mistakes? Quote Link to comment https://forums.phpfreaks.com/topic/283030-what-is-wrong-with-this-code-2/#findComment-1454222 Share on other sites More sharing options...
victormenezes Posted October 17, 2013 Author Share Posted October 17, 2013 help Quote Link to comment https://forums.phpfreaks.com/topic/283030-what-is-wrong-with-this-code-2/#findComment-1454303 Share on other sites More sharing options...
Barand Posted October 17, 2013 Share Posted October 17, 2013 Do a search on your code for "<?". If it isn't followed by "php " then change it to "<?php " Quote Link to comment https://forums.phpfreaks.com/topic/283030-what-is-wrong-with-this-code-2/#findComment-1454312 Share on other sites More sharing options...
victormenezes Posted October 17, 2013 Author Share Posted October 17, 2013 I changed the last tag "<?}?>" for this "<?php } ?>" and gave this error: Parse error: syntax error, unexpected '}' in C:\xampp\htdocs\postador\include\opcoes.php on line 54 help! Quote Link to comment https://forums.phpfreaks.com/topic/283030-what-is-wrong-with-this-code-2/#findComment-1454365 Share on other sites More sharing options...
Barand Posted October 17, 2013 Share Posted October 17, 2013 Then you need to check that all your {}s are in balanced pairs. Quote Link to comment https://forums.phpfreaks.com/topic/283030-what-is-wrong-with-this-code-2/#findComment-1454366 Share on other sites More sharing options...
requinix Posted October 17, 2013 Share Posted October 17, 2013 I changed the last tag "}?>" for this "<?php } ?>"Did you change all the others too? It's a stupid question but I feel compelled to ask. Quote Link to comment https://forums.phpfreaks.com/topic/283030-what-is-wrong-with-this-code-2/#findComment-1454370 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.