|
i wrote this :
#!/scr/bin/perl -w
use strict;
use warnings;
my $music="/home/sajad/intertainment/Music/001.MP3";
system "totem --play $music";
sleep(8);
exec "totem --quit $music";
exit;
after playing the music in 6 second(time of music) then it stopped until i close it then the command sleep(8) is running and after it terminate my program.i also wrote this code but as above result:
#!/scr/bin/perl -w
use strict;
use warnings;
my $music="/home/sajad/intertainment/Music/001.MP3";
system "totem --play $music";
exec "totem --quit $music";
exit;
|
|
|
|
|
ok... so you changed
system "totem --quit $music";
to
exec "totem --quit $music";
correct?
did you try the change I suggested which was:
system "totem --play $music";
to
exec "totem --play $music";
|
|
|
|
|
yes i also change it to all of states with changing exec to system or system to exec but it play the music repeatedly
also this is one of them:
#!/scr/bin/perl -w
use strict;
use warnings;
#system "oog" == 0 or die $!;
sleep(3);
my $music="/home/sajad/intertainment/Music/001.MP3";
system "totem --play $music && totem --quit $music";
#sleep(8);
system "totem --quit $music";#exec "totem --quit $music";
exit;
|
|
|
|
|
This is error:
aljaz@aljaz-laptop /Desktop$ nasm -f elf vhod.asm
aljaz@aljaz-laptop /Desktop$ ld -s -o vhod vhod.o
ld: i386 architecture of input file `vhod.o' is incompatible with i386:x86-64 output
ld: warning: cannot find entry symbol _start; defaulting to 00000000004000b0
vhod.o: In function `main':
vhod.asm text+0x7): undefined reference to `printf'
aljaz@aljaz-laptop /Desktop$
Here is code:
bits 32
extern printf
global main
section .data
message db "hello, world!", 10, 0
section .text
main:
pushad;
push dword message
call printf;
add esp, 4;
popad;
ret
|
|
|
|
|
Some suggestions:
1. It seems that you created an 32-bit application but try to compile it as an 32/64-bit application.
Try to add the parameter -m32 to ld.
2. I think you have to link your vhod.o with an library that holds the printf function.
3. At last, try to solve the warning by calling your main start or adding -e main to the ld statement.
I hope that helps and be aware this are only suggestions cause I never developed for linux.
Greetings
Covean
|
|
|
|
|
I always wanted to distribute my PHP files without having to distribute a server package like WAMP, XAMPP etc so now I use Viewer for PHP. Its open source and freely available:
http://viewerforphp.sourceforge.net/[^]
|
|
|
|
|
<?php
$url = "http://www.nseindia.com/content/equities/TopGainers.htm";
$html = strtolower(implode('', file($url)));
echo $html;
?>
Why i am unable to read this file ?
|
|
|
|
|
Permissions. DO you own the site? If so set you need to check your settings in php.ini on nseindia
|
|
|
|
|
udch wrote: file($url)
you need to look up and set permissions for that
|
|
|
|
|
Hey my friends ... I was using mail() function but some error occured
this is the code
<php
$to='compnay@yahoo.com';
$from=$_POST['txtEmail'];
$title=$_POST['txtTitle'];
$body=$_POST['txtMsg'];
if($_POST['form1'].submit)
{
mail($to,$title,$body,'From:'.' '.$from);
echo '<h1 >Thank you!
</h1>
<p>Email sent. We will contact you as soon as possible
</p><p><br /></p>';
}
else
echo 'not submitted';
?>
when I use the above code this error occured
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\Hiwi\send.php on line 26
Thank you!
Email sent. We will contact you as soon as possible
Can any body help me on this? I thought it was because I wasnt connected to the internet ..... even after I connected to the internet it comes again.
Is it because my site is not posted ? I am just working on it....
Any suggestions ....
Thank you
|
|
|
|
|
CoderForEver wrote: Failed to connect to mailserver at "localhost"
I take it you don't have an SMTP server on your localhost as that is what the error means.
You need to configure your php.ini with SMTP settings for a different, external SMTP server if you don't have one installed on your localhost.
You can find lots of information about your problem by doing a simple Google search[^] with your error message.
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
thank you man .... I already checked the SMTP .... I use Wamp Server just for to develop my websites. .... I will check ur soulutions
Thank you.
|
|
|
|
|
hey, although i havent tried emailing from my machine locally, just wondered if it was something to do with the mail client in your xammp control panel try turning on the mercury email client that should enable emailing from localhost. let me know if it works
|
|
|
|
|
I have got one idea .. not zat much cool ... when I post my finished website ... zer will be a webserver which we will post on US ... I hope zis function is the purpose of zat machine ... wat do u tink so? ... I just use mail() function ... only
|
|
|
|
|
hey, i dont quite understand what you mean!
|
|
|
|
|
How to boot linux .iso image in pen drive for installation
|
|
|
|
|
I don't know, but i took your question and put it into Google verbatim and found some very helpful links. Try looking here[^] and here[^].
|
|
|
|
|
Hi,
This is my cgi-bin folder
D:\www\xampp\cgi-bin
the shebang is like this
#!"D:/www/xampp/perl/bin/perl.exe"
and perl is in the folder like in the above path of shebang
here is my script alias entry in httpd.conf
ScriptAlias /cgi-bin/ "D:/www/xampp/cgi-bin/"
and the directory entry is as follows
<Directory "D:/www/xampp/cgi-bin">
AllowOverride All
Options Indexes FollowSymLinks ExecCGI
Order allow,deny
Allow from all
</Directory>
my file is printenv.pl and is saved in cgi-bin folder
but still i couldn't make the file run
i call it like localhost/printenv.pl
i get 404 error.
what shall i do?
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
"i call it like localhost/printenv.pl"
But, you should call it like this:
localhost/cgi-bin/printenv.pl
|
|
|
|
|
what is scriptalias? how to place the url in apache? i need clean details
please help me
<pre></pre>
|
|
|
|
|
|
Can we read .xls file in php like this one "http://www.nseindia.com/content/fo/fii_stats.xls"
|
|
|
|
|
Yes. but it's easier to work with csv (comma separated value) files. you can export/import csv files from excel.
|
|
|
|
|
Thanks for your help brother. I am downloading .xls file from a website it is not in csv format there. can you Suggest me where i get information how to read .xml in php or any command?
Thank You
|
|
|
|
|
udch wrote: I am downloading .xls file from a website it is not in csv format there
Can't you save it as csv yourself?
Google: Read XML with PHP[^]
|
|
|
|