473,573 Members | 4,448 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem for showing output of php file

18 New Member
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?
Jan 5 '10 #1
18 2305
Dheeraj Joshi
1,123 Recognized Expert Top Contributor
What code you have written.? Can you post the code you have written.?

Regards
Dheeraj Joshi
Jan 5 '10 #2
curi444
18 New Member
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $a=5;
  3. $b=10;
  4. $c=$a+$b;
  5. echo "vale is"$c;
  6. ?>
Jan 5 '10 #3
Dheeraj Joshi
1,123 Recognized Expert Top Contributor
Put that PHP in <body></body> tags of HTML

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. <?php
  4. $a = 4;
  5. $b = 6;
  6. $c = $a+$b;
  7. echo $c;
  8. ?>
  9. </body>
  10. </html>
  11.  
Jan 5 '10 #4
gits
5,390 Recognized Expert Moderator Expert
i think line 5 in post #3 throws an error which can be fixed with:
Expand|Select|Wrap|Line Numbers
  1. echo "vale is".$c;
since the operator for the string concat is missing.

kind regards
Jan 5 '10 #5
curi444
18 New Member
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

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. <?php
  4. //remember to change the password to whatever you set
  5. //it to in mysql instance configuration
  6.  
  7. //first parameter is server name, 2nd username 'root', 3rd is password
  8. $rst = @mysql_connect("localhost","root","root");
  9.  
  10. if (!$rst)
  11. {
  12.      echo "<p>Unable to connect to database manager.</p>" ;
  13.          die ('Could not connect: '. mysql_error());
  14.      exit();
  15. }
  16.  else 
  17. {
  18.   echo "<p>Successfully Connected to MySQL Database Manager!</p>" ;
  19. }
  20.  
  21. if (! @mysql_select_db("mysql") )
  22. {
  23.      echo "<p>Unable to  connect database...</p>";
  24.      exit();
  25. else 
  26. {
  27.   echo "<p>Successfully Connected to Database 'MYSQL'!</p>" ;
  28. }
  29. ?>
  30. </body>
  31. </html>
Jan 5 '10 #6
Markus
6,050 Recognized Expert Expert
If you right-click on the page and select 'View Source' (or something like that), what do you see? Do you see the PHP code?
Jan 5 '10 #7
curi444
18 New Member
it shows only<html><body >only
Jan 5 '10 #8
Markus
6,050 Recognized Expert Expert
So the PHP is being parsed - a good start.

Place this at the very beginning of your page:

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. echo "<h1>It works!</h1>";
  3. ?>
  4.  
Do you see anything?
Jan 5 '10 #9
curi444
18 New Member
the above code is working(ur code).

but y my code is not working?
Jan 5 '10 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

7
2481
by: Jos van Uden | last post by:
Can somebody explain why the following file has the wrong output: <?xml version="1.0" encoding="iso-8859-1"?> <test> <elem>‘bla bla bla’</elem> </test> Expected: ‘bla bla bla’ output: ?bla bla bla?
7
2024
by: Nicole | last post by:
Hi I'm trying to use a function to set a session variable. I have three files: The first file has: <?php session_start(); // This connects to the existing session ?> <html> <head>
1
4734
by: Arif | last post by:
Following are my text file(IndxItms.txt) contents: --------------------------------------------------- 0000 0 0002 52 0020 260 0045 312 0051 364 0087 416
2
3088
by: Tuna Fly | last post by:
I'm trying to work with XML/XSLT in the Visual Studio IDE (VS 2005) and when I select the menu option XML/Show XSLT Output I get a tab with the output showing the text HTML code. I'd like to have it display like it would in a browser instead. I'm working around it by coding the path to the XSLT into the XML file, keeping a browser open and...
9
5491
by: silversurfer2025 | last post by:
Hello everyone, I am currently having problems with a C++ abstract class. I have a class FrameWork.h which defines some methods (of which some are abstract, i.e. virtual void method() = 0). In FrameWork.cpp I define some of the methods while I naturally leave the abstract methods undefined. Now I wrote a class FrameWork_GUI.h which inherits...
9
5746
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just call it Express for simplicity). I have, to try to simplify things, put the exact same DB on two systems, one running MSDE and one running...
3
1782
by: Gladen Blackshield | last post by:
Hello; I'm a bit new to PHP and am having trouble with displaying an image through ANY of the IMAGE commands. I've read EVERY tutorial I could find, and even copied the code from exmaples...and nothing runs. I am running PHP version 4 (4.4.6) with GD 2.0
5
3730
by: John Kotuby | last post by:
Hi all, This is my first time trying to creaet and use a custome Web Control in a Web Site project in ASP.NET 2.0 with VS 2005 and VB. I created the control in a separate Web Control Library project. The original code for that control was written in VS 2003 for .NET 1.1. I created a Web Project and pulled the VB module into the project. I...
10
1460
by: John | last post by:
Hello, I have an html menu that I renamed menu.php. I then have a download program which uses an index.php file. I did the standard <?php include("menu.php"); ?command and I see the menu. However, it messes up the php index file. When I go to download a file it just opens the file on the screen for some reason rather than showing a popup...
6
3515
by: efrenba | last post by:
Hi, I came from delphi world and now I'm doing my first steps in C++. I'm using C++builder because its ide is like delphi although I'm trying to avoid the vcl. I need to insert new features to an old program that I wrote in delphi and it's a good opportunity to start with c++.
0
7741
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7661
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7978
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8167
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7730
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6349
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5252
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1263
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
987
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.