473,385 Members | 1,661 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

When output file shows only text...what's the problem?

In an attempt to try out some things with php, I have run into a new snag.
The output file is pure text.
Basically it's a simple photo gallery using <ul> links to show various
thumbnails.
In turn, the thumbnails show a bigger image.
All on the same page.
My only possible thinking is that it has something to do with the array
notation.
$image =array ( );
$image[101]="name.jpg";
Is it correct to say $image = array(999); ??
As to define 999 items? as in javascript?
Instead of using the normal 0 starting point, as I figure this is not
necessary.
It has worked up to a point, then all of a sudden I get the text output.

Jul 17 '05 #1
2 1549
"Richard" <An*******@127.001> wrote in
news:cu*********@news1.newsguy.com:
In an attempt to try out some things with php, I have run into a new
snag. The output file is pure text.
Basically it's a simple photo gallery using <ul> links to show various
thumbnails.
In turn, the thumbnails show a bigger image.
All on the same page.
My only possible thinking is that it has something to do with the
array notation.
$image =array ( );
$image[101]="name.jpg";
This should work, for example:

<?php
$image = array();
$image[101] = "name.jpg";
echo $image[101];
?>

...should output name.jpg.
Is it correct to say $image = array(999); ??
As to define 999 items? as in javascript?
No, in PHP, this would define an array with only one element, the integer
999.
Instead of using the normal 0 starting point, as I figure this is not
necessary.
It has worked up to a point, then all of a sudden I get the text
output.


What exactly is the text output that you're getting?

hth
--
Bulworth : PHP/MySQL/Unix | Email : str_rot13('f@fung.arg');
--------------------------|---------------------------------
<http://www.phplabs.com/> | PHP scripts, webmaster resources
Jul 17 '05 #2
On Wed, 09 Feb 2005 16:17:28 GMT Senator Jay Billington Bulworth wrote:
"Richard" <An*******@127.001> wrote in
news:cu*********@news1.newsguy.com:
In an attempt to try out some things with php, I have run into a new
snag. The output file is pure text.
Basically it's a simple photo gallery using <ul> links to show various
thumbnails.
In turn, the thumbnails show a bigger image.
All on the same page.
My only possible thinking is that it has something to do with the
array notation.
$image =array ( );
$image[101]="name.jpg"; This should work, for example: <?php
$image = array();
$image[101] = "name.jpg";
echo $image[101];
It's a bit more involved than just placing an image on the page.

..should output name.jpg. Is it correct to say $image = array(999); ??
As to define 999 items? as in javascript? No, in PHP, this would define an array with only one element, the
integer
999.
Wasn't sure. Thanks.
Instead of using the normal 0 starting point, as I figure this is not
necessary.
It has worked up to a point, then all of a sudden I get the text
output.

What exactly is the text output that you're getting?


Precisely the same text as the input file.

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Stuart McGraw | last post by:
I just spent a $*#@!*&^&% hour registering at ^$#@#%^ Sourceforce and trying to submit a Python bug report but it still won't let me. I give up. Maybe someone who cares will see this post, or...
0
by: Isaac Councill | last post by:
Hello, This seems like a newbie question, but I couldn't find the answer on google. I've been using xsl to transform rdf files into runnable programs in another (non-markup) language. It's...
0
by: Dimitre Novatchev | last post by:
You seem to be unaware of the xslt processing which uses the built-in rules in the absence of templates that match some selected node. http://www.w3.org/TR/xslt#built-in-rule According to the...
6
by: Mark Miller | last post by:
I have a scheduled job that uses different XSL templates to transform XML and save it to disk. I am having problems with the code below. The problem shows up on both my development machine (Windows...
0
by: CW | last post by:
I get this FieldCount error when I attempt to bind a datagrid with a dataset, not a datareader object. The code snippet is as belows: 'PopulateForm called in Page Load event Private Sub...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
4
by: ed | last post by:
Hi all, I'm very new to vb (2nd day) and I need to create a small app that will replace my old batch file with a flashy gui. I had some experience with access 2.0 which helps ;) What I would...
3
by: jambonjamasb | last post by:
Hi I have two tables: email_tbl Data_table Data table is is used to create a Form Data_form
10
by: sara | last post by:
Hi - I have a report that is 14 columnar sub-reports (Line up: Position- holders in each of our 14 locations - Manager, Assistant Manager, Receiving, Office, etc). I output directly to PDF...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.