flaab Posted August 5, 2008 Share Posted August 5, 2008 Hi, I have a really strange problem in a production server and I don't know what it is. I'm going nuts. I'm programming a HTML newsletter that is saved into he hard drive and sent by mail. So, the HTML code must be created dinamically. Take a look at the following (simplified) code. Basically, it grabs an array of strings and displays an image for each one of them. // Iteramos parrafos poniendo fotos si tenemos for($it = 0; $it < count($parrafos); $it++) { // El parrafo debe ser mas alrgo que 3 caracteres if(strlen($parrafos[$it]) > 2) { // Si tenemos foto para este parrafo if(isset($imagenes[$image_it])) { $cuerpo_final .= '<img width="80" src="http://www.ecoturismorural.com'; $cuerpo_final .= $imagenes[$image_it]; $cuerpo_final .= '" />'; $image_it++; } // Ponemos parrafo $cuerpo_final .= "\n<p>". $parrafos[$it] ."</p>\n"; } } The created string is not modified at any time before being printed on the screen. And the local output is the following: <img width="80" src="http://www.ecoturismorural.com/img/Parrafos/File/IMG_0161.JPG" /> <p>Durante la semana del 26 al 30 de Mayo un grupo ... (more text)</p> <img width="80" src="http://www.ecoturismorural.com/img/Parrafos/File/IMG_0166.JPG" /> <p>El programa "Galicia Natural" tiene como objetivo ... (more text)</p> That will be the correct output. The problem is...the same script executed on the production machine outputs other thing completely! - Domain names are removed from all URLS - Characters < > and " are trasnslated into html entities - Image outputs are surrounded by <p> and </p> All these all by its own! :s <p><img src="img/Establecimientos_Mini/4385La%20Monta%F1eta%201.JPG"></p> <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed lorem ... (more text)</p> <p><img src="img/Establecimientos_Mini/64266.jpg"></p> <p>Class aptent taciti sociosqu ad litora torquent per ... (more text)</p> And it's just he same echo(). I would really appreciate any help! Thanks! Quote Link to comment Share on other sites More sharing options...
JonnyThunder Posted August 5, 2008 Share Posted August 5, 2008 I'd imagine some of these issues are PHP.INI related. You should compare your local PHP.INI with the one on your live server and see whats different! Quote Link to comment 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.