Hi,
i am trying to implement toggle function with a table row. Everything is going fine except in IE8. The script which i was used is given below.
<script src="jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#report tr:odd").addClass("odd");
$("#repo...
Using CKEditor (combined with KCFinder for file upload), when I use the browse button and retrieve my file I get the path:
"/demo/cms/uploads/images/image.jpg"
Which is the path to the image, however if I then move the file around within the editor, the automatically path changes to:
"uploads/images/image.jpg"
Which won't work from...
Can you please guide me how can I convert an image from a URL to base64 encoding?
thanks
...
I have to extract this particular HTML using PHP. Since I haven't any class or unique ID I tried to use his bgcolor attrib but without success...
<td bgcolor="#F5EC97" width="154" valign="top" align="left" height="55">
<font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><font color="#CC6633">CITY</font></b><br>...
I need to find all records that are exactly 3months old in Postgres
My query looks as follows.
SELECT * FROM adds WHERE adtype = 'CL' AND DATEDIFF(dstart,DATE(now())) = DATE_SUB(curdate(),interval 3 month);
But this does not seem to work. Any advise help with this query will be helpful. I can calculate this in PHP but want to find out...
I need to run a javascript function from a phpunit test with selenium and check the javascript returns true. I've looked into using runScript but it never seems to run (I've tested this by adding an alert to the code, but it never shows..).
My javascript needs to check the opacity of an element is 1, if not use setTimeout to run the fun...
hi i cannot update a table which has foreign keys on it. in this table, instead of displaying the primary keys of the foreign key, i choose to display their names: this is a simple diagram:
Here are my foreign tables:
Size Table:
sId sName
1 1x1
2 2x2
Brand Table:
bId bName
1 brand1
2 brand2
Supplier Table:
sId sNa...
I have an PHP website on a RHEL5/CentOS dedicated server. The website is located at /var/www/html/beta
I have a script:
/var/www/html/beta/scriptA.php
which calls a function in
/var/www/html/beta/code/inc/functions.php
The function uses move_uploaded_file() as follows:
$status = move_uploaded_file($imagetmp_name,$destinationPath...
EDIT: I found out that the keys aren't the problem like I said in the comments. I can use them without any issues to encrypt and decrypt data on OpenSSL.
But I need to decrypt a string on OpenSSL that was previously encrypted via Crypto++
and that's not working.
I'll post additional details later.
Hi, I have encrypted a string using a...
I want any request to /files/ to be redirected to one php script, and all others (that aren't for specific file types) to be directed to another. No matter what I try I can't get this to work. This is from my apache2 virtual server config file:
<Directory /var/www/test/public>
RewriteEngine On
RewriteBase /files
RewriteRule ~files/(.+)...
I know this is not programming related question so to speak, but since we are programmers and we might use Netbeans for PHP development.
I am wondering how can I get in Netbeans a selection from a list of files quickly. Suppose there are different folders for MVC pattern and I edit 1 section of it. I would like to see the 3 files that I...
What is the fastest way of sorting this both alphabetically by country and numerically by date?:
Array
(
[JAPAN] => Array
(
[2010-10-17] => 2
)
[CUBA] => Array
(
[2010-10-16] => 9
)
[RUSSIAN FEDERATION] => Array
(
[2010-10-16] => 26
[2010-10-17] => 6
[2010-10-18] => 2
)
...
Guys,
Im running this example given on zendcasts and i seem to be getting a "Illegal Token" error.
An error occurred
Application error
Exception information:
Message: Illegal Token
Stack trace:
#0 /Applications/Zend/Zend Studio - 7.2.1/plugins/org.zend.php.framework.resource_7.2.0.v20100324-1300/resources/ZendFramework-1/library/Z...
I need to aggregate RSS content from roughly 500 URL's, while I'm trying to get content from those URL's time out/memory exhausted error occurred(I am trying with SimplePie library).
Is there any method/idea to pull out content fast from bulk sources?
How do I get fresh contents every time?
<?php
require_once('include/simplepie.inc');...
hi,
I have had a cakephp app running fine on my local machine (mac osx) for a while and then suddently I realise that I can't connect to mysql.sock.
I'm getting this error:
Warning (2): mysql_connect() [http://php.net/function.mysql-connect]: [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) [CORE/...
Seems the only option is to use xdebug,since according to this thread ,zend debugger only support non-thread-safe(nts) PHP.
But xdebug lacks support for pausing ,for which I think xdebug is very badly designed.
So I'm suffering xdebug whenever I need to debug PHP5.3-ts.
How do you make your life easier?
...
I am about to write a voting method for my site. I want a method to stop people voting for the same thing twice. So far my thoughts have been:
Drop a cookie once the vote is complete (susceptible to multi browser gaming)
Log IP per vote (this will fail in proxy / corporate environments)
Force logins
My site is not account based as ...
Hello,
This is a simple issue but I have been unable to solve this. My problem is that I am sending email using the libmail class.
$message = htmlspecialchars(stripslashes(strip_tags($message)));
Everything is working fine but if I use the " in the text, it will be diaslayed in the mail as ". I have already tried:
mail ($strTo...
How do you sort a multidimensional array by primary and secondary key?
For example, assuming the following array:
$result = array();
$result[0]["prio"] = 1;
$result[0]["date"] = '2010-02-28';
$result[0]["post"] = "February's thoughts";
$result[1]["prio"] = 0;
$result[1]["date"] = '2010-04-20';
$result[1]["post"] = "April's thoughts";
...
Hi,
i try round function, but standart function don't good to me(all number must work in one function).
I have numbers: 0.7555 and 0.9298
And how round i this case:
0.7555 - 0.75
0.9298 - 0.93
Thanks
...