Reply to Re: [PHP] Problems with headers

Your name:

Reply:


Posted by Jim Jagielski on 09/27/53 11:27

Set BBEdit to use Mac OS Roman. From the main window, choose
the file icon (5th from left).

Graham Anderson wrote:
>
> --Apple-Mail-15-928383921
> Content-Transfer-Encoding: 7bit
> Content-Type: text/plain;
> charset=US-ASCII;
> format=flowed
>
> Ok, I think I figured it out .
>
> I had to convert my BBedit text editor file to plain text and then
> copy/paste that text directly into a new server text file
> So, I guess my $100+ text editor is screwing up the file ?
> Is there some way to prevent this ?
>
> My text encoding is in UTF-8 because I have been working with non-Latin
> languages of late...
> Is there some bullet proof way to prevent this...or some filtering
> script I should run ?
> These 3 ?'s do not appear in BBedit file when I turn invisibles on...
> I am working in OS X.
>
>
> This is the output from my BBedit [my text editor] file on the
> server, my main text editor
> Notice the 3 Question Marks at the beginning....
>
> 0000000 ? ? ? < ? p h p \n $ x m l =
> 0000020 < < < E O B \n < ? x m l v e
> 0000040 r s i o n = " 1 . 0 " ? > \n < ?
> 0000060 q u i c k t i m e t y p e = "
> 0000100 a p p l i c a t i o n / x - q t
> 0000120 s k i n " ? > \n < s k i n > \n <
> 0000140 m o v i e s r c = " . . / . .
> 0000160 / f o n o v i s a . m o v " / >
> 0000200 \n < c o n t e n t r e g i o n
> 0000220 s r c = " . . / i m a g e s / m
> 0000240 a s k . g i f " / > \n < d r a g
> 0000260 r e g i o n s r c = " . . / i
> 0000300 m a g e s / d r a g . g i f " /
> 0000320 > \n < / s k i n > \n E O B ; \n h
> 0000340 e a d e r ( " A c c e p t - R a
> 0000360 n g e s : b y t e s " ) ; \n h
> 0000400 e a d e r ( " C o n t e n t -
> 0000420 L e n g t h : " . s t r l e n
> 0000440 ( $ x m l ) ) ; \n h e a d e r (
> 0000460 ' C o n t e n t - T y p e : v
> 0000500 i d e o / q u i c k t i m e ' )
> 0000520 ; \n e c h o $ x m l ; \n ? > \n
> 0000540
>
> the script is encoded as utf-8 in BBedit
>
>
> --Apple-Mail-15-928383921
> Content-Transfer-Encoding: quoted-printable
> Content-Type: application/x-php;
> x-mac-type=54455854;
> x-unix-mode=0644;
> x-mac-creator=522A6368;
> name="fonovisa_simplev2.php"
> Content-Disposition: attachment;
> filename=fonovisa_simplev2.php
>
> =EF=BB=BF<?php=0A=20$xml=20=3D=20<<<EOB=0A<?xml=20version=3D"1.0"?>=0A=
> <?quicktime=20type=3D"application/x-qtskin"?>=0A<skin>=0A<movie=20=
> src=3D"../../fonovisa.mov"/>=0A<contentregion=20=
> src=3D"../images/mask.gif"/>=0A<dragregion=20src=3D"../images/drag.gif"/>=0A=
> </skin>=0AEOB;=0Aheader("Accept-Ranges:=20bytes");=0Aheader=20=
> ("Content-Length:=20".strlen($xml));=0Aheader('Content-Type:=20=
> video/quicktime');=0Aecho=20$xml;=0A?>=0A=
>
> --Apple-Mail-15-928383921
> Content-Transfer-Encoding: 7bit
> Content-Type: text/plain;
> charset=US-ASCII;
> format=flowed
>
>
>
>
> ----------------
> Plain Text File output
> The plain text version does output properly :)
> If I od-c the the plain text, I do not get the 3 Question Marks at the
> beginning
>
> 0000000 < ? p h p \n $ x m l = < <
> 0000020 < E O B \n < ? x m l v e r s i
> 0000040 o n = " 1 . 0 " ? > \n < ? q u i
> 0000060 c k t i m e t y p e = " a p p
> 0000100 l i c a t i o n / x - q t s k i
> 0000120 n " ? > \n < s k i n > \n < m o v
> 0000140 i e s r c = " . . / . . / f o
> 0000160 n o v i s a . m o v " / > \n < c
> 0000200 o n t e n t r e g i o n s r c
> 0000220 = " . . / i m a g e s / m a s k
> 0000240 . g i f " / > \n < d r a g r e g
> 0000260 i o n s r c = " . . / i m a g
> 0000300 e s / d r a g . g i f " / > \n <
> 0000320 / s k i n > \n E O B ; \n h e a d
> 0000340 e r ( " A c c e p t - R a n g e
> 0000360 s : b y t e s " ) ; \n h e a d
> 0000400 e r ( " C o n t e n t - L e n
> 0000420 g t h : " . s t r l e n ( $ x
> 0000440 m l ) ) ; \n h e a d e r ( ' C o
> 0000460 n t e n t - T y p e : v i d e
> 0000500 o / q u i c k t i m e ' ) ; \n e
> 0000520 c h o $ x m l ; \n ? >
> 0000534
>
>
> many thanks :)
> g
>
> On Sep 22, 2005, at 10:15 AM, Rasmus Lerdorf wrote:
>
> > Graham Anderson wrote:
> >> Thanks Rasmus :)
> >> that is an incredibly cool tip: EOB
> >> Surprised I did not see you at the Digital Rights [hollywood digital]
> >> conference in LA early this week.
> >> Upside: Free sushi and an ocean view. Downside: Lots of 'agency' types
> >> and sales folk....
> >>
> >>
> >> when I access a straight movie file with no php, fonovisa.mov,
> >> everything looks good when I curl it
> >> HTTP/1.1 200 OK
> >> Date: Thu, 22 Sep 2005 16:52:45 GMT
> >> Server: Apache/1.3.33 (Unix) PHP/4.4.0 FrontPage/5.0.2.2510
> >> Last-Modified: Tue, 20 Sep 2005 17:58:39 GMT
> >> ETag: "1b28dcc-e3-43304dcf"
> >> Accept-Ranges: bytes
> >> Content-Length: 227
> >> Content-Type: video/quicktime
> >>
> >> * Connection #0 left intact
> >> * Closing connection #0
> >> <?xml version="1.0"?>
> >> <?quicktime type="application/x-qtskin"?>
> >> <skin>
> >> <movie src="../../fonovisa.mov"/>
> >> <contentregion src="../images/mask.gif"/>
> >> <dragregion src="../images/drag.gif"/>
> >> </skin>
> >> --------
> >>
> >> If I use PHP to generate the same output, I get the error: can not
> >> modify the headers.
> >> Could the file extension, .php, somehow be preventing the php script
> >> from outputting properly ?
> >
> > Do this:
> >
> > od -c filename.php
> >
> > And send us the output. If it is really long, put it online somewhere.
> > You have a stray carriage return or some other weird character in
> > there
> > somewhere.
> >
> > -Rasmus
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> --Apple-Mail-15-928383921
> Content-Type: text/plain; charset=us-ascii
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> --Apple-Mail-15-928383921--
>


--
=======================================================================
Jim Jagielski [|] jim@jaguNET.com [|] http://www.jaguNET.com/
"If you can dodge a wrench, you can dodge a ball."

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация