Search found 2257 matches

by swirlee
Tue Jun 07, 2005 7:22 am
Forum: PHP coding => General
Topic: Wikipedia style text editing
Replies: 3
Views: 1306

by swirlee
Fri Jun 03, 2005 7:05 am
Forum: JavaScript
Topic: I want to search the local C drive for *.pst file
Replies: 20
Views: 8521

The documentation has a section called Handling file uploads. I recommend you read it.
by swirlee
Fri Jun 03, 2005 7:04 am
Forum: PEAR and PECL
Topic: PHP PEAR installation problem
Replies: 1
Views: 4302

Last I checked go-pear.bat was in php/bin. Use the search, Luke.
by swirlee
Wed Jun 01, 2005 7:27 am
Forum: mySQL & php coding
Topic: Question on mysql database
Replies: 3
Views: 1356

if you are accessing the same table, it's just the same, if you're going to group your 100000 records and create diff tables for them its much faster. I highly recommend against creating different tables for the same types of data. The performance benefits would be negligible and it will cause head...
by swirlee
Thu May 26, 2005 12:36 pm
Forum: PHP coding => General
Topic: external program
Replies: 2
Views: 1311

shocks... how about any other external program in the likes of notepad? iexplore? etc? The closest you can come is sending the user a file which, depending on how their system is configured, will be opened in a particular program. For example, SecureCRT has special session files that describe all t...
by swirlee
Thu May 26, 2005 10:09 am
Forum: JavaScript
Topic: I want to search the local C drive for *.pst file
Replies: 20
Views: 8521

ruturajv wrote:yes JAVA can do it NOT javascript


Are you sure? You're correct about JavaScript, of course, but I thought that in-browser Java applets ran inside a "sandbox" so that it could not access files on the client machine without permission.
by swirlee
Thu May 26, 2005 10:05 am
Forum: PHP coding => Images
Topic: getimagesize from different document root
Replies: 4
Views: 2254

When dealing with paths in PHP, you're dealing with the actual path in the operating system, not the path from the web server's document root. So if the file is in some other document root, use the absolute path to that document root on the filesystem (hint: an absolute path always starts with /).
by swirlee
Thu May 26, 2005 10:01 am
Forum: PHP coding => General
Topic: redirect using post
Replies: 6
Views: 1501

I would use cURL to submit the data to the payment gateway. I read a tutorial on that very subject not long ago, but can't find it, so that link will have to do.
by swirlee
Thu May 26, 2005 9:57 am
Forum: PHP coding => General
Topic: external program
Replies: 2
Views: 1311

The trouble here is that PHP cannot launch a program on the client machine. You could make it run a program on the server, but that doesn't do you much good. The closest you could come is just using a telnet url (telnet://ip.ip.ip.ip:4444).
by swirlee
Wed May 25, 2005 7:45 am
Forum: PHP coding => General
Topic: 'network days' style function
Replies: 1
Views: 990

Let me get this straight: you want a function that will return an array which contains today's date and the dates of the next four days, excluding weekends? Okay, we can do that. <?php function five_days($start_date = NULL) { // if a start date isn't specified, use today if($start_d...
by swirlee
Wed May 25, 2005 7:27 am
Forum: PHP coding => General
Topic: Trimming last characters from a string
Replies: 1
Views: 819

Yours is basically how I'd do it. Of course, I'd put it in a function:

Code: Select all

<?php
function trim_string($string, $chars_to_trim) {
  return substr($string, 0, strlen($string) - $chars_to_trim);
}
?>
by swirlee
Tue May 24, 2005 10:33 am
Forum: PHP Scripts
Topic: How to call a VB dll from PHP ?
Replies: 9
Views: 4643

You can't call a .dll that's on the user's system, and a .dll on your server won't be able to find files on the user's system.
by swirlee
Tue May 24, 2005 10:32 am
Forum: PHP General
Topic: gettimeofday() how to use it?
Replies: 11
Views: 3251

Basically you're going to use date() to get the current hour. Then you're going to compare it to see if it's greater than 17 (5pm) or less than 5 (5am). <?php function time_between_5_and_5() { $hour = date('G'); // returns the hour (0-23) return ($hour >= 17) || ...
by swirlee
Fri May 13, 2005 9:35 am
Forum: Free time
Topic: Numbering
Replies: 64
Views: 38445

Ok, but there's always the possibility to add the blocks, hilite it and delete the blocks. It will be hilited and without the blocks ;) No, that would confuse the highlighter a lot. I agree that this isn't really necessary -- if people want their code highlighted correctly, they'll use the PHP tags...
by swirlee
Fri May 13, 2005 9:33 am
Forum: PHP General
Topic: target
Replies: 3
Views: 1812

One word: Ajax.

This would take some impressive JavaScript kung-fu, but it's certainly possible. But the guys are right, not a lot of PHP is involved.
by swirlee
Thu May 05, 2005 12:52 pm
Forum: mySQL & php coding
Topic: Count of element in array
Replies: 1
Views: 1023

You're looking for GROUP BY. Something like this:

Code: Select all

SELECT first_name, COUNT(first_name) GROUP BY first_name;
by swirlee
Thu May 05, 2005 12:49 pm
Forum: Free time
Topic: Numbering
Replies: 64
Views: 38445

It looks great except where lines wrap. E.g., your code from above: <?php phpinfo(); echo("Whatever Just writing lots of BS to test the wrapping... i dont really think its going to work but i can hope that it will.. right? ehh... i hope you guys agree with me... if not -- well... so...
by swirlee
Thu May 05, 2005 6:21 am
Forum: Free time
Topic: Numbering
Replies: 64
Views: 38445

I'm not as close to the code as you are Alexei, so I defer to your expertise, but couldn't it be done as an unordered list in the following way?: Strip out all of the <br>s, then split the string on line breaks and iterate through each line, adding a <li> before and </li> after each line, and finall...
by swirlee
Wed May 04, 2005 9:30 am
Forum: mySQL & php coding
Topic: auto_increment limit
Replies: 2
Views: 904

I'm not sure why this would happen. The only solution I can suggest is this: Delete the row with the really high number, then create another column of the same type. Copy all of the values from the AUTO_INCREMENT column to the new column, then delete the AUTO_INCREMENT column and set the new column ...
by swirlee
Wed May 04, 2005 7:07 am
Forum: Free time
Topic: Numbering
Replies: 64
Views: 38445

Alexei, did you design this skin? It's gorgeous.
by swirlee
Mon May 02, 2005 10:58 am
Forum: Free time
Topic: Numbering
Replies: 64
Views: 38445

I don't know what the poll is for -- I don't think anybody objects to line numbering. I certainly think it's useful. I just don't think we need this "custom starting line" business.
by swirlee
Fri Apr 29, 2005 10:44 am
Forum: PHP coding => General
Topic: Sessions causing invalidation
Replies: 2
Views: 1003

You can turn off the automatic PHPSESSID-appending in php.ini, but of course that will make things not work for people with cookies turned off. Personally, I just wouldn't worry about it. I like having valid pages as much as you do, but in the end it's just a tool, not a goal. At any rate, you shoul...
by swirlee
Thu Apr 28, 2005 10:58 am
Forum: Free time
Topic: Numbering
Replies: 64
Views: 38445

Alexei Kubarev wrote:well..would you use it?!


No, not really.

so why not?!


For the reasons outlined above, including "this will require majour rewriting".
by swirlee
Thu Apr 28, 2005 6:49 am
Forum: Free time
Topic: Numbering
Replies: 64
Views: 38445

we know..but how about letting a user to define a start line number : this will require majour rewriting.. oh well some big part anyways.. How many users do you think would really use this? My guess? None. Or maybe one, ever. We have a hard enough time getting people to use the [code] tags in the f...
by swirlee
Thu Apr 28, 2005 6:44 am
Forum: PHP General
Topic: E-learning system
Replies: 3
Views: 1450

planketa wrote:thanks, but can we generate chart and graphs with php and mysql?


Please try Google before asking questions like these. Nine times out of ten you'll get your question answered much faster.