i installed wamp5 in windows xp.it shows all services are working.but when am opened a php file using browser it show a white page only,not show the out put. what is the reason?
problem for showing output of php file
Collapse
X
-
-
Put that PHP in <body></body> tags of HTML
Code:<html> <body> <?php $a = 4; $b = 6; $c = $a+$b; echo $c; ?> </body> </html>
Comment
-
am tried another way also...iis ,php,mysql and windows xp.
using this also when am connecting to mysql db don't showing any errors.the browser page only shows blank.wt is the reason
this is the code am runned in browser
Code:<html> <body> <?php //remember to change the password to whatever you set //it to in mysql instance configuration //first parameter is server name, 2nd username 'root', 3rd is password $rst = @mysql_connect("localhost","root","root"); if (!$rst) { echo "<p>Unable to connect to database manager.</p>" ; die ('Could not connect: '. mysql_error()); exit(); } else { echo "<p>Successfully Connected to MySQL Database Manager!</p>" ; } if (! @mysql_select_db("mysql") ) { echo "<p>Unable to connect database...</p>"; exit(); } else { echo "<p>Successfully Connected to Database 'MYSQL'!</p>" ; } ?> </body> </html>Comment
-
Okay - let's see what MySQL is complaining about.
Try this code, remember to fill in your MySQL server credentials.
Code:<?php print("Attempting to connect to MySQL<br />"); /** Change these to your correct details */ $link = mysql_connect("localhost", "root", "root"); if (!$link) { printf("Unable to establish connection to MySQL. Reason:<br /><br />%s", mysql_error()); } else { print("Connection successful.<br />"); }Comment
Comment