Lines of code shown in php page execution
Posted by: javox (---.prod-infinitum.com.mx)
Date: April 10, 2010 06:16AM

Hi:

I have Wampserver installed and running but when i execute a php page it shows lines of code at the top of the page, is like an echo or something, here is a sample of what i get :

ddField("nombre", true, "text", "", "1", "", "Información requerida"winking smiley; $formValidation->addField("paterno", true, "text", "", "1", "", "Información requerida"winking smiley; $formValidation->addField("materno", true, "text", "", "1", "", "Información requerida"winking smiley; $formValidation->addField("dom_particular", true, "text", "", "1", "", "Información requerida"winking smiley; $formValidation->addField("dom_consultorio", true, "text", "", "", "", ""winking smiley; $formValidation->addField("calle", true, "text", "", "1", "", "Información requerida"winking smiley; $formValidation->addField("numero", true, "text", "", "1", "", "Información requerida"winking smiley; $formValidation->addField("colonia", true, "text", "", "1", "", "Información requerida"winking smiley; $formValidation->addField("cp", true, "numeric", "", "", "", "Información requerida"winking smiley; $formValidation->addField("ciudad", true, "text", "", "", "", "Información requerida"winking smiley; $formValidation->addField("pais", true, "text", "", "", "", "Información requerida"winking smiley;

Actually the "code" is larger, but you get the idea.
At the end of that the html is shown but it also contains some code lines.

Guess is something in the PHP config...right?


I´m really new to PHP (not to mention MySql and Apache...)

Thank you for your help.

Javox

Options: ReplyQuote
Re: Lines of code shown in php page execution
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: April 10, 2010 11:55AM

Make sure you're going to [localhost] to run your php scripts, never open php files directly into your browser.

If your script is using short tags eg <? ?> or <?= ?> then you will will enable this. To do so left click wamp tray icon and choose PHP > PHP Settings > short open tag

Options: ReplyQuote
Re: Lines of code shown in php page execution
Posted by: javox (---.prod-infinitum.com.mx)
Date: April 10, 2010 06:09PM

Dear c2dan:

Thank you for your advice, the short tags did the trick.

javox

Options: ReplyQuote


Sorry, only registered users may post in this forum.