|
I've got the answer by contact phpmailer group.
On IIS we have to use sth like this script for sending mail.
require("include/mailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->From = "me@communitymx.com";
$mail->FromName = "My Name";
$mail->AddAddress("mds_soft@yahoo.com");
$mail->Subject = "Test PHPMailer Message";
$mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
$mail->Subject = "PHPMailer Test Subject via smtp";
$mail->Host = "mail.sth.com";
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Username = "smtp Username ";
$mail->Password = "smtp password";
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!";
}
Although these file are in /include/mailer/
class.smtp.php
class.phpmailer.php
class.pop3.php
|
|
|
|
|
Hi, i want to install pgadmin3 to fedora8
i have found this link
http://rpmfind.net/linux/RPM/fedora/updates/8/ppc/pgadmin3-1.8.4-1.fc8.ppc.html
Do i need to install all rpms there(required ones) or is there a way that i can install pgadmin3 with yum?
thanks...
|
|
|
|
|
Hello all.
I saw somewhere this function:
function char_cube3d(&$bitmaps, $letter)
{ ... }
What's the meaning of & sign ?
Thank you.
|
|
|
|
|
The parameter will be passed to the function by Reference. (the second parameter will be passed by Value)
|
|
|
|
|
|
Just as a side note...PHP 5+ always pass objects & arrays by reference so you don't need to use them if you are doing PHP5 development.
I'm finding the only constant in software development is change it self.
|
|
|
|
|
|
Hi there guys.
can we use PHPBB3 captcha classes in our project ?
Thank you.
modified on Friday, August 22, 2008 6:42 PM
|
|
|
|
|
I got the answer here[^]
modified on Friday, August 29, 2008 5:35 PM
|
|
|
|
|
Hello,
In my program, I first receive data from another machine, then processing the data. Data receiveing is fast, but data processing is relatively time consuming. Hence, I put the code for data processing in a POSIX thread (i am using RedHAt enterpriese linux 4). In the main() function, I receive data first. Whevenever a data is received, a new thread for data processing is created. I use the following code to test the above program design. It seemed dones not work.
void * thread_func(void * arg)
{
printf("thread_func is running %s\n" ,(void *)arg);
}
main()
{
thread_t thread[100];
char *str;
int i;
for(i=0; i<10; i++
{
str = (char*)malloc(sizeof(char)*200);
strcpy(str, "Hello World\n");
int ret;
ret = pthread_create(&thread[i] ,NULLthread_func,(char *)str);
printf("after pthread_cread ret= %d",ret);
free(str);
pthread_detach()thread[i];
}
}
I noticed the value of 'ret' is 0, indicating that 10 threads have been created successfully. However, I could not see the sentence "thread_func is running ......
Could anybody look at this code and let me know why it does not work .
Thanks
|
|
|
|
|
any1 with experteese in these fields
/\|-||\/|/\|)
|
|
|
|
|
Hi there.
I want to get a directory size by PHP.
for example I used this code :
$size = disk_total_space("../upload")/ 1024;
echo $size;
but I saw this warning :
Warning: disk_total_space()
[function.disk-total-space]: The system cannot find the
path specified. in H:\Apache2.2\htdocs\c-panel\cp_folders.php
on line 88
I'm sure that this folder "../upload" exist.
What's wrong with it and how I can solve it ?
thanks in advance
|
|
|
|
|
All right, I found this function here[^]
function dirsize($dir,$buf=2)
{
static $buffer;
if(isset($buffer[$dir]))
return $buffer[$dir];
if(is_file($dir))
return filesize($dir);
if($dh=opendir($dir))
{
$size=0;
while(($file=readdir($dh))!==false)
{
if($file=='.' || $file=='..')
continue;
$size+=dirsize($dir.'/'.$file,$buf-1);
}
closedir($dh);
if($buf>0)
$buffer[$dir]=$size;
return $size;
}
return false;
}
|
|
|
|
|
hi,
May be it is not detecting this type of relativ path.You can try absolute path here
$size = disk_total_space("/upload")/ 1024;
echo $size;
I hope this will work.
Thanks
-Inder Singh
|
|
|
|
|
|
Hi Guys,
I have a PHP script that grabs customer names (about 30,000+) from a MySQL Database, and using PHP outputs to the client browser. From this list then can select which customer they will insert, or update, a record for.
Once the page is loaded, I use an onChange event (using AJAX) attached to the select list to populate part of the page with with customer information.
There are basically two pages that use this. On the INSERT page, where new SALE record is created, and the UPDATE page, where a sale may be edited. Obviously the end user needs to be able to select ANY of the customers stored, and the assumption that they may know the spelling, or part thereof, of a customer cannot be made... otherwise a nice search and select function would be great!
It is obviously bad practice to load so many customers in at once, So I am looking for suggestions or solutions.
One idea i had was to load only the customer for which the sale is to be edited, and then when they click on it, load the rest, but that still sucks.
maybe a search function is the best way, just wish users were not so incompetent :P
cheers for any ideas guys,
mick
|
|
|
|
|
Breaking the data down into sub-categories, such as all customers with surnames beginning with A, for example, followed by all of these customers with first names beginning with A, or that live in a particular region; I assume this would cut the number of records being fetched down drastically?
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|
|
Usually when I have that many records I opt for a paginated list and not rely on comboboxes or
One option I can think of is using AJAX to dynamically update the combobox as selectedIndex reaches the last element -- insert 500 more. However this still has the problem that if the user scrolls without using keyboard selectedIndex doesn't change so you would need to capture the scroll position as well and I'm not sure that is possible inside a drop down or native HTML control. Lastly using AJAX like this would destroy any chance of accessibility you might have. If someone disabled JavaScript they'd never be able to use your application.
I would go for either two or more combobox'es and categorize them or use a paginated list.
I'm finding the only constant in software development is change it self.
|
|
|
|
|
Hi guys,
Thanks for your interesting replies.
Hockey, I had a similar idea with the automatic update, its a great idea, and accessability doesnt matter, since this is an internal intranet style project, and they won't need to implement accessability standards (until the next programmer is hired, lol! poor bastard)
In regards to the Javascript being disabled, the way the program works now, almost every page relies on Javascript being enabled. Every avenue with this project has been against any standards, and most coders would have a hemorage if they saw the source code! :/
The users will ALWAYS use the mouse to select from the drop down menu, and it already has an ajax onChange event attached, so I will have to read up about this selectedIndex and how to implement it.
I believe this is probably the correct way to go though.
Once again, thanks very much for your help guys,
Mick
|
|
|
|
|
Thought some of you might be interested in this: DevExtraPHP
It's a very simple PHP syntax highlighter for Visual Studio 2005/2008. It doesn't support anything advanced like statement completion or debugging, but for the casual PHP developer like myself it makes PHP just that bit more pleasant.
Brad
|
|
|
|
|
bradr wrote: It's a very simple PHP syntax highlighter for Visual Studio 2005/2008. It doesn't support anything advanced like statement completion or debugging, but for the casual PHP developer like myself it makes PHP just that bit more pleasant.
I'm using DreamWeaver. It's great.
However thanks.
|
|
|
|
|
Hi there.
What's difference between $_REQUEST and $_POST ?
And which of them is better to using ?
Thank you.
|
|
|
|
|
OK. Thank you for reply
We talked about it here[^] and I got my answer.
|
|
|
|
|
You can submit forms using one of two methods- GET or POST. These go into $_POST and $_GET arrays when received by a PHP script. You cannot access values in the $_GET array by using $_POST['value'] and vice versa. The $_REQUEST array however, contains both GET and POST values regardless. So if you post or get value 'x' in a form, it is accessible by $_REQUEST['x']. You can find more information here-
http://www.w3schools.com/PHP/php_post.asp[^]
Good luck!
Ranjit Viswakumar
Professional Services Specialist
rviswakumar@hostmysite.com
http://hostmysite.com/?utm_source=bb[^]
|
|
|
|
|
It was an old question.
Thanks anyway TapeBoy929.
|
|
|
|