Title says it all.
In regards to action heplers, routes, etc...
I look forward to answers from people who've worked with both ASP.NET MVC and some PHP MVC project...
I have this line of PHP code:
thisFunctionDoesNotExist();
And it stops script execution with:
Fatal error: Call to undefined function
I tried using set_error_handler and it does help for warning type of errors. But not for fatal errors. As I understand it from various threads on internet it should be possible to handle by set_error_handler, but I cannot make it work.
Can you please post working example?
In php 5, all variable and objects are passed by reference, but i can't get my codes work
My codes is:
$arrayA = array();
$array = $arrayA;
...
if(!in_array(thedata, $array) // if i use & to get ref, got an error here, should i use *$array here?
$array[] = thedata;
var_dump($arrayA);
The result is empty, am i missing something simple?
I understand that I can set the option on any specific instance, however what I would really like is to set something up php.ini or somewhere similar which will handle this across all projects and all instances.
Does anyone know a way for me to accomplish this?
how can i decrypt password string in php which is crypt
$salt = substr($_POST['password'], 0, 2);
$password = crypt($_POST['password'], $salt);
i need to send the password in email "forgetpassword"
I have two Zend Date objects to work with:
$now = Zend_Date::now();
$sessionStart = new Zend_Date('2010-04-01 10:00:00', 'yyyy-MM-dd HH:mm:ss');
I need to calculate the time remaining and display in a human readable manner.
The session will begin in 7 days.
The session will begin in 30 minutes.
How can I do this with PHP and the Zend Framework?
can any one please let me know is there any way to grab a screen shot of a web page when we pass the URL as parameter. I have a requirement to capture a screen shot of that page when posting a blog.
This i need in php script.
Hi,
I have a common script which Im including in my php cron files and the files which are accessing through the browser. Some part of the code, I need only for non cron files. How can I detect whether the execution is from CLI or through browser (I know it can be done by passing some arguments with the cron files but I dont have access to crontab). Is there any other way ?
Regards
Binoy
here's a definition of marshaling from Wikipedia:
In computer science, marshalling
(similar to serialization) is the
process of transforming the memory
representation of an object to a data
format suitable for storage or
transmission. It is typically used
when data must be moved between
different parts of a computer program
or from one program to another.
I have always done data serialization in php via its serialize function, usually on objects or arrays. But how is wikipedia's definition of marshaling/serialization takes place in this serizalize() function?
I guess if it is possible, that it will be some crazy convoluted way, but my client has asked me to try to create a log file of people who log in to the site.
Is there a way to do this? I don't know php/smarty so well, I'm more of a layout person.
Thanks.
Just wondering if there are any good tutorials on PHP/MySQL on the web that's free. I looked at youtube and the tutorials they have there are a bit too easy.
PHP treats all arrays as associative, so there aren't any built in functions. Can anyone recommend a fairly efficient way to check if an array contains only numeric keys?
Basically, I want to be able to differentiate between this:
$sequentialArray = array('apple', 'orange', 'tomato', 'carrot');
and this:
$assocArray = array('fruit1' => 'apple',
'fruit2' => 'orange',
'veg1' => 'tomato',
'veg2' => 'carrot');
What sort ort of programming paradigm (sockets,RPC,Web services,Distributed objects middleware) is usually used between web server and application server in PHP n-tier architecture?Whats the difference of using DOM or Web services for this purpose?
How a programming call is usually made between web server and application server in a PHP n-tier architecture when the servers are on separate machines in the network?Whats the difference of using DOM(Distributed object middleware) or Web services for this purpose?
Where can I find tutorials about creating a social network (like db structure, sql query samples eg.) using PHP & MySQL ? I do not need a ready script, I just want to learn how to do it..
I am looking to start a community based on user posted scripts such as bashrc, screenrc, aliases, etc.
Does anyone know of a web application in PHP that would do that?
I am not looking for a snippet program, or a link directory.
Users can store linux/UNIX/Windows configuration files, as well as maybe an option to attach a screenshot.
In my php application, I'm using $_SESSION to track whether a user is logged in. If a user leaves any page on my site at http://mysite.com and goes to http://someotherwebsite.com, I want to automatically log them out, such that if they return to any page on http://mysite.com, they need to login again.
Is there an easy way to do this?
I am using a multidimensional array and I am trying to use php to find the last value of one of the arrays and based on that last number(value), add one more to it.
Here is my multidimensional array structure:
$_SESSION['cart']['add_complete'][1]['deck_id']
I am trying to create this structure, but instead of where it says 1 now, I want to find out what the last number in the add_complete array is and then add one more to it and put that in the place of the 1. How can I do that?
This is the solution for linux:
http://stackoverflow.com/questions/45953/php-execute-a-background-process/45966#45966
Is there one for windows?
Maybe this?
start "window1" /min cmd.exe /c batch1.cmd
But I don't know what it does exactly:(
Hello. Does anyone know how I can make a live chat on a webpage? Maybe using PHP and have the text stored into a database? If so, how could I get the text to automatically show on the users live chat, without refreshing?
Any ideas? Thanks.
I know that I can use DOMDocument and DOMXPath to manipulate XML files. But, I really love JQuery, and it would be great if there was something more like JQuery in the PHP world that I could use for sever side DOM manipulation.
NOTE: I'm only interested here in how
JQuery Selects and Manipulates the DOM, not all
the other parts of JQuerry (I guess
you can say just the Pop and the Sizzle
parts).
We all know the infamous "cannot redeclare class" error. Is there any method to overcome this and actually declare a new class with the same name, or is this impossible in PHP 5?
Is there free and good line-level profiler for PHP? I'm using xdebug and it's relatively good but it gives me function level output and sometimes it's hard to see where exactly all the time spent in the function goes.