Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

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

 
   Database Help (Home) -> PHP RSS
Next:  Collection in php/MySQL  
Author Message
anonymous540

External


Since: Nov 27, 2004
Posts: 5



(Msg. 1) Posted: Wed Feb 09, 2005 10:55 am
Post subject: When output file shows only text...what's the problem?
Archived from groups: comp>lang>php (more info?)

this post is not archived.

 >> Stay informed about: When output file shows only text...what's the problem? 
Back to top
Login to vote
user3712

External


Since: Feb 02, 2005
Posts: 21



(Msg. 2) Posted: Wed Feb 09, 2005 12:40 pm
Post subject: Re: When output file shows only text...what's the problem? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Richard" wrote in


 > 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

 >> Stay informed about: When output file shows only text...what's the problem? 
Back to top
Login to vote
anonymous540

External


Since: Nov 27, 2004
Posts: 5



(Msg. 3) Posted: Wed Feb 09, 2005 12:40 pm
Post subject: Re: When output file shows only text...what's the problem? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wed, 09 Feb 2005 16:17:28 GMT Senator Jay Billington Bulworth wrote:




  >> 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.
 >> Stay informed about: When output file shows only text...what's the problem? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
extra newlines in output text added by PHP file include - I have a simple PHP script that outputs a string requested by an Ajax page. XMLHttpRequestObject.responseText as received from the PHP script begins with 2 extra newline characters (\n\nMyString): <?php require_once('DB.php');..

php to display mysql output text as hyperlink - Hi, Not sure if this goes to PHP or mySQL group (or both!). I've got a home brewed blog started using PHP and mySQL to store and display the entries/postings. I've figured out that I could format the way the entries are displayed from the database..

Output XML file! - I have a XML variable (string). I want to output it to a XML file. I'm using <?php header("Content-type: application/gps"); header("Content-Disposition: attachment; filename=paring.xml"); print $xml; ?> But I get an error ...

Insert text file in a text field - allo, I have 2 questions: with php and mysql : 1) How can I insert a text file into a TEXT field of a table ? 2) How can I insert a microsoft word file into a BLOB field of a table ? Please, could you help me with a simple example ? Thank you . ..

Read a file with filter, and give the output - Hi! I would like to create a php script that read a txt file and filter it with 2 keywords, first keyword deifne the start and the second one the end of the txt to read. And then give the output extracted. Expter of the group, could you help me? thanks!
   Database Help (Home) -> PHP All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]