473,883 Members | 1,599 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 2338
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
2493
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
2042
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
4740
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
3102
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 hitting the refresh button which isn't a huge deal, but I was wondering if there's a configuration...
9
5513
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 from the abstract FrameWork class and implements the missing (so far abstract) methods....
9
5768
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 Express. Both have 2 Ghz processors (one Intel, one AMD), both have a decent amount of RAM (Intel system...
3
1794
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
3757
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 compared the syntax to the VB template classs that was built and it looked very similar. I then...
10
1481
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 window asking where to put the downloaded file. I then tried to just add the html code into the...
6
3538
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
10752
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10858
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10420
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9582
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7974
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7134
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5804
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5996
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4225
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.