I have an XML ISO-8859-1 page, in which I have to output symbols like é.
If I output é it errors out. é works just fine.
So, what PHP function should I use to transform é to é
I can't move to utf-8 (as I assume some will suggest and rightfully so) This is a huge, legacy code.
I'm having a hard time installing zend_debugger, somehow the installed version doesn't match with my php.
Is there a repository for all versions of zend_debugger?
I would like to do something like this:
abstract class Foo
{
public function __construct()
{
echo 'This is the parent constructor';
}
abstract function __construct();
}
class Bar extends Foo
{
// constructor is required as this class extends Foo
public function __construct()
{
//call parent::__construct() if necessary
echo 'This is the child constructor';
}
}
But I get a fatal error when doing this:
Fatal error: Cannot redeclare Foo::__construct() in Foo.php on line 8
Is there another way to ensure child classes have a constructor?
Hi,
I have a simple question. Is it okay to use array without single or double quotion like $array[key]? I thought it is bad because PHP look for constant first if I don't use single or doulbe quotion. One of my colleagues told me that it does not matter.
WHat do you guys think?
I have an XML ISO-8859-1 page, in which I have to output symbols like é.
If I output é it errors out. é works just fine.
So, what PHP function should I use to transform é to é
I can't move to utf-8 (as I assume some will suggest and rightfully so) This is a huge, legacy code.
How can I go about adding users/number, changing things from PHP(or python) on an asterisk server?
ps. also are there any better ways to get the current asterisk settings, users, numbers other than scraping the config files?
Quick question: One can set the path where a cookie is valid, but is it also possible to get (read) this path from the cookie (in PHP)?
Or else: is it possible to extend a cookie's time, without knowing what path it's on (but keeping the path the same)?
I am using exec() inside a a script that runs as a daemon and forks child processes using the pear class Net_Server.
I am getting a strange issue whereby the return code (the third param of of exec) comes back as -1. When I run the command on the command line, or with exec in a normal php script the return code is 0 as it should be. Anyone have any idea why this is happening, and how to fix it?
This code is being used to parse email, it's stored as a table in a mySQL database. I believe it's PHP code. What does the (.+) do?
/A new order has been successfully placed through(.+)Name:(.+)Company:(.+)Email:(.+)Address 1(.+)Order ID:(.+)Date:(.+)Payment Type:(.+)Order Status:(\s*)Accepted(.*)\n(.+)\$([\d\.]+)\s+X/si
Thanks, super-brainiacs!
How to write byte by byte to socket in PHP?
For example how can I do something like:
socket_write($socket,$msg.14.56.255.11.7.89.152,strlen($msg)+7);
The pseudo code concatenated digits are actually bytes in dec. Hope you understand me.
I need a way to see all the defined variables of the current PHP instance.
By currently defined I mean all the globals, all the local to THIS scope and all the locals to other scopes.
Is there something built in?
Has anyone here tried it or is it possible?
I've been using PHP for quite a few years but never know exactly the underlying c scripts.
Is there a way to go into it?
Hi all
I Have a system. I which I need to edit the PDF in every specific evcent, for that I googled a lot and reached to conclusion that it can be achieved by first converting PDF to HTML, editting the HTML and then again converting the same HTML to PDF file.
Is there any Library available in PHP to convert PDF file to HTML?
And if anyone available with other way to achieve my task, please let me know,
NOTE: PLEASE DO NOT SUGGEST ZEND FRAMEWORK USE.
Hello, i was viewing this video and i really want to develop this is PHP with no AJAX, do you how to start? where can i find some examples codes? Thanks.
In php how would I grab all javascript from a page given it's url? Is there a good regular expression to get the src of all javascript script tags or the script inside of them?