473,503 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP shows in page source

36 New Member
Hello All,

I have configured php apache and mysql at home and have coded with relative success.

I have signed up to a web hosting company and am operating on a shared server.

PHP 4.4.4 is configured on a linux box.

This set up is an FTP site. I need to FTP my pages to the server.

Wanting to test the php setup I tried to run a very simple script:

Expand|Select|Wrap|Line Numbers
  1. <?
  2. $c = 0;
  3.  
  4. while ($c < 5) {
  5.    echo("<h1>Hello</h1>");
  6.    $c++;
  7. }
  8. ?>
I would expect to go to my site and see Hello displayed 5 times.

Instead I see the last half of my code. When I view source I see all my php sitting there.

I have contacted the company and they tell me that php is configured properly on that server.

Is there something I am doing wrong ???

I have also tried <?php as a start bracket.

There php info file states that shortcut is on and magic quotes are off..

This script works on my development web server I set up at home.

Thanks,

Chris
Nov 27 '07 #1
1 1157
FNA access
36 New Member
Never mind...

I just needed to upload as a .php file.

Sorry
Nov 27 '07 #2

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

Similar topics

2
1894
by: aa | last post by:
I have an UTF-8 PHP file which generates HTML Then I cut the beginning of that file, pasted into another UTF-8 file ind included this second file into the first one. After that the whole page...
0
2616
by: mews.microsoft.com | last post by:
My ASP.NET pages record the referal url for each current page into session. This is then being used by the cancel button to go back to the calling page. Page Navigation is achieved thru'...
9
3141
by: news | last post by:
I'm working on a new site for my wife's college art organization: http://www.ie-studios.net/mci/ and I'm having a problem where a PDF in an IFrame is supposed to go "invisible" (and in fact is...
3
4920
by: Kevin Pedersen | last post by:
Hello, I am using an editable datagrid. After I save the changes the datagrid shows the old values. I've read the posts about the Page_Load and not binding the datagrid each time. The SQL that...
0
1150
by: Vincent Mouton | last post by:
Hi, I am having trouble integrating a System.Windows.Forms.Control into an asp.net page. I based my tryout on the sample provided in the quickstart tutorials...
8
7810
by: pmud | last post by:
Hi, I am using a compare validator in asp.net application(c# code). This Custom validator is used for comparing a value enterd by the user against the primary key in the SQL database. IF the...
2
1660
by: K B | last post by:
Hi, I have a basic master page with a title bar and two content placeholders. Then I created a new aspx page with that MasterPage. I added one label control to the content holder as a test. ...
3
1837
by: JebBushell | last post by:
The page never gets to Page_Load and displays blank. Setting the trace flag makes no difference. View Source reveals: <BODY> <ASP_SMARTNAV_RDIR...
2
3364
by: Roger | last post by:
I've got two tables in sql2005 which have an 'ntext' field when I linked the first table in access97 last week using an odbc data source the access-field type was 'memo' when I link the 2nd...
3
1397
by: =?Utf-8?B?UmljaGFyZA==?= | last post by:
Hi, I got latest from an ASP .NET project from TFS. With the project loaded in Visual Studio, I opened a vb source file from this web project, and pressed F5 to run the project. IE opens, and...
0
7199
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,...
0
7074
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...
0
7273
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,...
1
6982
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...
0
7451
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...
0
5572
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,...
1
5000
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...
0
4667
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...
0
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.