I am trying to connect to my oracle database using PDO but I am getting Class PDO not found error. I have checked that PDO is enabled and it appears so. Still I am not able to trace why I am getting this error. Here is my configure command,
cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack"
"--with-snapshot-te...
I'm currently using PHP's mail() function to email the HTML Body of another PHP file using concatenation.
This is currently working fine, however, I would prefer the script to simply get the parsed HTML Body rather than using the concatenation method.
I've read a few incomplete forum posts regarding using fopen() and fread() but had no...
How can a PHP script detect if a socket has been closed by the remote party?
...
What messaging platform would be the best choice for asynchronous message queuing (publish, consume) between PHP and Java apps? I have looked at RabbitMQ, ActiveMQ, OpenAMQ, Tibco Rendezvous, and Websphere MQ. Persistence is required. I love the idea of AMQP and using an open protocol, but I've heard of stability issues with RabbitMQ, wh...
Is it possible even to do this kind of things?
EDIT
Can someone provide a "hello world" demo to try out?
...
I am writing a game in PHP/Zend Framework and Facebook JavaScript. The gameboard is displayed in a scrolling window. To view the entire gameboard, the user must scroll around. Each step of the game causes a page refresh, so when the user moves on to another step, their scroll postion is lost and the window is returned to it's default pos...
I tried:
mb_strlen('普通话');
strlen('普通话');
both of them output 9,while in fact there are only 3 characters.
What's the right way to count characters?
...
I first configure my script to run even after the HTTP request is over
ignore_user_abort(true);
then flush out some text.
echo "Thats all folks!";
flush();
Now how can I trick the browser into thinking the HTTP request is over? so I can continue doing my own work without the browser showing "page loading".
header(??) // someth...
Here is an excerpt function:
function excerpt($text, $phrase, $radius = 100, $ending = "...") {
270 if (empty($text) or empty($phrase)) {
271 return $this->truncate($text, $radius * 2, $ending);
272 }
273
274 $phraseLen = strlen($phrase);
275 if ($radius < $phraseL...
Hi ,
I am doing a hobby project to scrape the content of an ASP.net website using Ruby or PHP or Java . For example if the website url " www.myaspnet.com/home.aspx" . i would like to extract the unicode text content from home.aspx and paste it to a notepad . Is there any libraries available in any of the above mentioned languages ...
How can I take a multi-dimensional array like the below, and split it into multiple separate arrays? Additional challenge: Although I know there are two pairs in the example below (pageviews, visits), how can you do it assuming that you don't know the number of pairs in the array? For example, I may want to add "time on page" or "pages v...
if I use Firefox and access http://svcs.ebay.com/services/search/FindingService/v1 I get some sort of XML in respose, when I do that through PHP I get Internal Server Error 500
$ php -r 'print_r(simplexml_load_file("http://svcs.ebay.com/services/search/FindingService/v1"));'
PHP Warning: simplexml_load_file(http://svcs.ebay.com/servic...
Hi I have placeholder text in my content from the CMS like this:
$content = "blah blah blah.. yadda yadda, listen to this:
{mediafile file=audiofile7.mp3}
and whilst your here , check this: {mediafile file=audiofile24.mp3}"
and i need to replace the placeholders with some html to display the swf object to play the mp3.
How do i do a r...
Hi,
I read that to include the Zend framework, I must include this on the include path in php.ini. But I have a doubt.
Where do I find the php.ini file in my WAMP with php 5.3.0?
Please help me because I am new to this topic and also to PHP...
Thanks in advance.
...
Hello
note: to the editors: please edit the title if have a better one :)
my question is:
I have two tables in my database
-----------
| table1 |
|----------|
| id |
|text |
===========
-----------
| table2 |
|----------|
| id |
|text |
==========...
I have a datetime field (endTime) in mysql. I use gmdate() to populate this endTime field.
The value stored is something like 2009-09-17 04:10:48. I want to add 30 minutes to this endtime and compare it with current time. ie) the user is allowed to do a certain task only 30 minutes within his endTime. After 30 minutes of his endTime, ...
Hai
I got an error message
Notice: Use of undefined constant APPLICATION_PATH - assumed 'APPLICATION_PATH' in C:\wamp\www\index.php on line 4
Notice: Use of undefined constant APPLICATION_PATH - assumed 'APPLICATION_PATH' in C:\wamp\www\index.php on line 5
When i put below code in index.php:
set_include_path(
'C:\wamp\www\Zend\...
Say,$arr contains multiple sub-arrays with the key "pos",
$arr = sortByKey($arr,'pos');
After that the sub-array with smallest "pos" value will be ordered first,and so on.
EDIT
$sub1 = array('pos' => 2);
$sub2 = array('pos' => 1);
$arr = array($sub1,$sub2);
$arr = sortByKey($arr,'pos');
After this function,$arr will be array($sub2...
Hi, currently I have this client code in my PHP MVC web app:
try {
BookMapper::insert($book);
} catch (DbUniqueConstraintViolationException $e) {
$errorList->addMessage($book . " already exists!");
}
I'm wondering is it bad practice to refer to the low-level framework Db* exceptions to my client code? If so, should I adjust my mo...
Hai
I put this in to php.ini
include_path = ".;c:\php\includes;C:\wamp\zend\library"
C:\wamp\: here i put the zend frame work
when i run the wamp sever , i seen a pge as usual
How i check whether it's install or not ,
How i start my work in the frame work
...