[PHP] fopen and file dump to a databace...

2003-03-09 Thread Mark Tehara
HI, I'm looking to take the data from a CSV file, then upload it into a
mysql databace.

I figure i will need the following.

To count the number of lines ... and cut up each line in its veriables then
entering it into the databace.

I have:

$file = fopen("pricelist-snippet.csv","r");
$buffer = fread($file,1);
echo $buffer;

This dumps the data to the screen ...

where would i start to making cutting this data up by the line?

/ Mark



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Displaying a file

2003-03-09 Thread Mark Tehara
On that note, how would i load an image from outside the document root?



- Original Message -
From: "Justin French" <[EMAIL PROTECTED]>
To: "Todd Cary" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 4:06 PM
Subject: Re: [PHP] Displaying a file


> Change your link to something like:
>
> ...
>
> view.php will NOT be a "HTML page" -- it will be responsible for:
>
> a)  some conditional stuff, like checking for a logged in user
> b)  output an appropriate header for the file type
> c)  pass through the actual file contents
>
>
> You would actually want to store the target files outside the doc root, or
> forbid apache to serve them directly over http.
>
> There's a decent article here:
> http://www.zend.com/zend/trick/tricks-august-2001.php
>
>
> Justin French
>
>
>
> on 10/03/03 1:17 PM, Todd Cary ([EMAIL PROTECTED]) wrote:
>
> > I want to display a file under program control in the same manner as one
> > would with using an >a> tag e.g.
> >
> > Click  > Target="_blank">here to open the Race Schedule
> >
> > In other words, if certain conditions are met, then I want to display
> > the file.  What is the best way to do that?
> >
> > Many thanks.
> >
> > Todd
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Items displayed left and right, help newman.

2003-07-01 Thread Mark Tehara
Where should i start with the lodgic.  I'm trying to list a group of items


Left: item one, Right: Item 2


This is repeated

I can only seem to get them to go str8 down not left then right.


Any Ideas?

/ Mark

Re: [PHP] Items displayed left and right, help newman.

2003-07-01 Thread Mark Tehara
Dude, Can you not use something like

while 

and then add a for ($i=1 to ... lodgic...

(o;

- Original Message - 
From: "Mark Tehara" <[EMAIL PROTECTED]>
To: "PHP" <[EMAIL PROTECTED]>
Cc: "Philip J. Newman" <[EMAIL PROTECTED]>
Sent: Wednesday, July 02, 2003 3:56 PM
Subject: [PHP] Items displayed left and right, help newman.


Where should i start with the lodgic.  I'm trying to list a group of items


Left: item one, Right: Item 2


This is repeated

I can only seem to get them to go str8 down not left then right.


Any Ideas?

/ Mark


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] [Newman] Passing an image through a php file.

2003-06-19 Thread Mark Tehara
I would like to pass an image throught http://server/newman/ImageTEST/image.php 

1. I need the headers (Assuming)  would make 
the computer think its a image file.
2. load the image using fopen ("d://crushme//images//1.jpg", "r");





 The image "http://server/newman/ImageTEST/image.php"; cannot be displayed, because it 
contains errors. 

This returns this error (above)

Yes 1. Image is in the right location.
Yes 2. I'm stuck.

Any Suggestions would be very good.

/ Mark /



Re: [PHP] [Newman] Passing an image through a php file.

2003-06-19 Thread Mark Tehara


This seemed to do the trick for me.  Thank you.

/ Mark

- Original Message -
From: "CPT John W. Holmes" <[EMAIL PROTECTED]>
To: "Awlad Hussain" <[EMAIL PROTECTED]>; "Mark Tehara"
<[EMAIL PROTECTED]>; "PHP" <[EMAIL PROTECTED]>
Sent: Friday, June 20, 2003 1:14 AM
Subject: Re: [PHP] [Newman] Passing an image through a php file.


> > try this:
> >  >
> > header("Content-type: image/jpeg");
> > fopen ("d:/crushme/images/1.jpg", "r");
>
> Just my opinion, but maybe you should try reading the file and echoing the
> data instead of just opening it. :)
>
> ---John Holmes...
>
>
> > I would like to pass an image throught
> > http://server/newman/ImageTEST/image.php
> >
> > 1. I need the headers (Assuming)  ?>
> > would make the computer think its a image file.
> > 2. load the image using fopen ("d://crushme//images//1.jpg", "r");
> >
> >
> >  >
> > header("Content-type: image/jpeg");
> > fopen ("d://crushme//images//1.jpg", "r");
> >
> > ?>
> >
> >
> >  The image "http://server/newman/ImageTEST/image.php"; cannot be
displayed,
> > because it contains errors.
> >
> > This returns this error (above)
> >
> > Yes 1. Image is in the right location.
> > Yes 2. I'm stuck.
> >
> > Any Suggestions would be very good.
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [Newman] Passing an image through a php file.

2003-06-20 Thread Mark Tehara
Ahh, the Docs don't tell you that.

They are a little weard wehen it comes to that 

- Original Message - 
From: "Lars Torben Wilson" <[EMAIL PROTECTED]>
To: "Mark Tehara" <[EMAIL PROTECTED]>
Cc: "PHP" <[EMAIL PROTECTED]>
Sent: Friday, June 20, 2003 10:53 PM
Subject: Re: [PHP] [Newman] Passing an image through a php file.


> On Thu, 2003-06-19 at 20:19, Mark Tehara wrote:
> >  > 
> > $myimage="..//..//site//images//2.jpg";
> > 
> > header("Content-type: image/jpeg");
> > fopen ("$myimage", "r");
> > readfile("$myimage") ;
> > fclose("$myimage");
> > 
> > ?>
> > 
> > This seemed to do the trick for me.  Thank you.
> > 
> > / Mark
> 
> Even better, you don't even need the fopen() and fclose() calls;
> readfile() is doing this with just the filename.
> 
>   http://www.php.net/readfile
> 
> 
> -- 
>  Torben Wilson <[EMAIL PROTECTED]>+1.604.709.0506
>  http://www.thebuttlesschaps.com  http://www.inflatableeye.com
>  http://www.hybrid17.com  http://www.themainonmain.com
>  - Boycott Starbucks!  http://www.haidabuckscafe.com -
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] WEB HOST NEEDED!!!!!

2003-06-24 Thread Mark Tehara
http://www.futurepathsnz.com/webhosting.html
Cheap hosting.
http://www.aoteahosting.com/
Moew Cheap hosting

Free isn't the word.  Free is for scabs

- Original Message - 
From: "Denis 'Alpheus' Cahuk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 12:09 AM
Subject: [PHP] WEB HOST NEEDED!


> Like I said, I need a web host.
> It MUST support PHP, mySQl and sending emails, optional.
> It shouldn't have any ads (pop-ups, ads), but I will allow if it has 
> watermarks (SMALL! watermarks).
> It should be TOTALY FREE!
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php