php-windows Digest 15 Jan 2005 12:09:27 -0000 Issue 2535
Topics (messages 25325 through 25332):
Re: [PHP] php editor
25325 by: Armando
25326 by: Wagner, Aaron
25329 by: Tony Devlin
25330 by: Florin C.
Call ActiveX component
25327 by: Louis Young
Insert range in Excel
25328 by: Louis Young
Change Excel spreadsheet
25331 by: Louis Young
Re: including an HTML file
25332 by: Randy Clamons
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
i use vi!
Or notepad when I'm on a Windoze box. Wordpad has too much fluff. I like
to keep it as simple and plain text as possible.
:)
Jason Barnett wrote:
I use Wordpad. Seriously ;)
--- End Message ---
--- Begin Message ---
I use UltraEdit32. It is a wordpad on steriods. It has downloadable syntax
modules for http, apache config files, perl, php, javascript, etc etc.
It has ability to auto-indent, color syntax coding, and auto-saving.
www.ultraEdit.com
aaron
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: January 13, 2005 16:55
> To: [email protected]
> Cc: [EMAIL PROTECTED]
> Subject: [PHP-WIN] RE: [PHP] php editor
>
>
> It's true that googling would produce a list of PHP-happy
> editors, but the intended question seems to be more along the
> lines of "What does everyone like? Use? Prefer?" That's
> not something that's always found on lists you'd get off of google.
>
> Helpful responses aren't always ones that are technically correct.
>
> -TG
>
> = = = Original message = = =
>
> "Know any goog ones?"
>
> funny you should mention goog.. if you google'd "php editor" youd have
> your answer by now..
>
> cheers
> phpninja
>
> -----Original Message-----
> From: William Stokes [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 13, 2005 8:02 AM
> To: [email protected]
> Subject: [PHP] php editor
>
> Hello,
>
> I'm quite new with writing php code. I was considering of
> using some kind of
> php editor program to help with the syntax. Know any goog ones?
>
> Thanks
> -Will
>
>
> ___________________________________________________________
> Sent by ePrompter, the premier email notification software.
> Free download at http://www.ePrompter.com.
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
I use HTML-Kit or Ultra Edit (depending on which machine I am developing
on). HTML-Kit can be found here (http://www.chami.com/html-kit/), It's like
wordpad with steriods (color coding, plug in ability (however I have not
tried any), line highlighting, other helpful tools).
Tony Devlin
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Thursday, January 13, 2005 4:55 PM
To: [email protected]
Cc: [EMAIL PROTECTED]
Subject: [PHP-WIN] RE: [PHP] php editor
It's true that googling would produce a list of PHP-happy editors, but the
intended question seems to be more along the lines of "What does everyone
like? Use? Prefer?" That's not something that's always found on lists
you'd get off of google.
Helpful responses aren't always ones that are technically correct.
-TG
= = = Original message = = =
"Know any goog ones?"
funny you should mention goog.. if you google'd "php editor" youd have
your answer by now..
cheers
phpninja
-----Original Message-----
From: William Stokes [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 13, 2005 8:02 AM
To: [email protected]
Subject: [PHP] php editor
Hello,
I'm quite new with writing php code. I was considering of using some kind of
php editor program to help with the syntax. Know any goog ones?
Thanks
-Will
___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I use crimsoneditor
http://www.crimsoneditor.com
On Thu, 13 Jan 2005 17:06:55 -0500, Jason Barnett
<[EMAIL PROTECTED]> wrote:
> I use Wordpad. Seriously ;)
>
> --
> Teach a person to fish...
>
> Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html
> PHP Manual: http://www.php.net/manual/en/index.php
> php-general archives: http://marc.theaimsgroup.com/?l=php-general&w=2
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Florin C.
Mobil 0721.075.787
--- End Message ---
--- Begin Message ---
Hi there
I'm trying to call an ActiveX object from PHP. The code in ASP looks as
follows:
Set DelphiASPObj = Server.CreateObject("ClientBalance.coClientBalance")
DelphiASPObj.GetClientBalance (Trim(Session("Outlet")) & "E") ,
Trim(Application("FinURL")), ReturnBalance
I tried this in PHP:
$DelphiASPObj = COM("ClientBalance.coClientBalance"); // Line 281
$ReturnBalance=$DelphiASPObj->GetClientBalance(trim($Outlet_session)."E"),trim($Application["FinURL"]));
But I get the following error message:
*Parse error*: parse error in *C:\Program Files\Apache
Group\Apache2\htdocs\spar\admin\rpt_electrans.php* on line *281
Any ideas?
Cheers
Louis
*
--- End Message ---
--- Begin Message ---
Hi guys
I managed to get this far with my Excel spreadsheet:
// Set the workbook to use and it's sheet
$workbook=$_GLOBALS["templatedir"]."\ElectricityTransactions.XLT";
$sheet="Sheet1";
//Instantiate the spreadsheet component.
$ex = new COM("Excel.sheet") or Die ("Did not connect");
//Open the workbook that we want to use.
$wkb = $ex->application->Workbooks->Open($workbook) or Die ("Did not open");
//Create a copy of the workbook, so the original workbook will be preserved.
$ex->Application->ActiveWorkbook->SaveAs($_GLOBALS["reportdir"]."\rpt_electrans_".trim($Outlet_session).".xls");
//$ex->Application->Visible = 1; #Uncomment to make Excel visible.
//Read and write to a cells in the sheet
$sheets = $wkb->Worksheets($sheet); //Select the sheet
$sheets->activate; //Activate it
$cell = $sheets->Cells(1,2) ; //Select the cell (Row Column number)
$cell->activate; //Activate the cell
$cell->value = "ELECTRICITY TRANSACTIONS Outlet ".trim($Outlet_session);
//Change it
But now how would I insert a range i.e., simulate in Excel the following:
Select range B8:H8. Right click and select insert.
Any ideas?
Cheers
Louis
--- End Message ---
--- Begin Message ---
Hi
What would be the best way to do the following:
Open an existing Excel spreadsheet. Make some changes to it. Save it
under a different file name.
Anybody got some source or a URL?
Cheers
Louis
--- End Message ---
--- Begin Message ---
Gaetano,
Try using fread() instead of fgets(). You can read the entire file contents
into a single variable. You could then use a regular expression to extract the
content. Something like this:
// get contents of a file into a string
$filename = "/usr/local/something.txt";
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);
// pattern includes everything beginning with the opening body tag
// and ending with the closing body tag (tags included)
// s modifier allows a match across multiple lines
// i modifier to ignore case
$pattern ="/<body.*<\/body.*?>/si";
preg_match($pattern, $contents, $matches) ;
// $matches is an array with one element
echo $matches[0] ;
Randy Clamons
Systems Programming
Astro-auction.com
> ------------Original Message------------
> From: "Gaetano Savoca" <[EMAIL PROTECTED]>
> To: [email protected]
> Date: Thu, Jan-13-2005 10:19 PM
> Subject: Re: [PHP-WIN] including an HTML file
>
> On Friday, January 14, 2005 1:06 AM [GMT+1=CET],
> Gaetano Savoca <[EMAIL PROTECTED]> ha scritto:
>
> > So i must do all manually
> >
> > i write this
> >
> > <?php
> > if(file_exists($corpo)){// controll for the file
> > //Creating the filehandle for our input file
> > $fh=fopen("$corpo", "r");
> >
> > //Seeding the while loop below with the first line of the
> > input file
> > $line=fgets($fh);
> > while (!feof($fh)){
> > //Once we hit the <BODY> tag, start echoing out
> lines
> > until we hit </BODY>
> > if (preg_match("/<BODY/i", $line)){
> > while (!preg_match("/<\/BODY/i", $line =
> > fgets($fh))) echo $line;
> > }
> > $line = fgets($fh);
> > }
> > fclose ($fh);
> > }
> >>
> >
> > where $corpo is a variable for the name of the file.
> > if the file not existe the page have a blank body
> >
> > Thanks
> >
> > _________________________________
> > Gaetano Savoca
> > http://gsweb.altervista.org
> >
> >
> >
> >
> >
> > On Thursday, January 13, 2005 11:16 PM [GMT+1=CET],
> > Leif Gregory <[EMAIL PROTECTED]> ha scritto:
> >
> >> Hello Gaetano,
> >>
> >> Thursday, January 13, 2005, 11:56:41 AM, you wrote:
> >>> How i can include in a HTML (with .php extension) file another HTML
> >>> file, i mean not all teh page but only the element of the <BODY>
> >>> tag?
> >>
> >>> I would to include with the include (nomefile); the body of other
> >>> page
> >>
> >>> There are some php function or some other way to do this?
> >>
> >> Uhmmm.. Lesse. I did something similar to this when I wrote some
> code
> >> to give me the headers from webservers. I had to use regexps to do
> >> it.
> >>
> >> Basically you could do something like this:
> >>
> >> <?php
> >>
> >> //Creating the filehandle for our input file
> >> $fh=fopen("myIncludeFile.html", "r");
> >>
> >> //Seeding the while loop below with the first line of the input file
> >> $line=fgets($fh);
> >>
> >> while (!feof($fh))
> >> {
> >> $line = fgets($fh);
> >>
> >> //Once we hit the <BODY> tag, start echoing out lines until we hit
> >> </BODY> if (preg_match("/<BODY/i", $line))
> >> {
> >> while (!preg_match("/<\/BODY/i", $line))
> >> {
> >> echo $line;
> >> $line = fgets($fh);
> >> }
> >> }
> >> else
> >> {
> >> $line = fgets($fh);
> >> }
> >> }
> >> fclose ($fh);
> >>
> >>>
> >>
> >>
> >> I didn't actually test this, but it should work. I just took some
> >> odds and ends pieces from something else I wrote that was similar.
> >>
> >> There's room for improvement. Like right now it'll continue
> >> processing the outer while loop after the </BODY> but since </HTML>
> >> usually follows on the next line I didn't think it too inefficient.
> >> You could make the outer while stop by ANDing with the condition of
> >> the inner while loop.
> >>
> >> As always... There's going to be other ways to do this. Some of them
> >> are probably a heck of a lot better than mine.
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---