2108 solutions found
Page 17 of 106votes
I'm reading out lots of texts from various RSS feeds and inserting them into my database. Of course, there are several different character encodings used...
votes
Is it possible to configure [xampp][1] to serve up a file outside of the `htdocs` directory? For instance, say I have a file located as follows: `C:\proje...
votes
I've found an error on a page in my Magento application; it always show this message error when I visit it: > Fatal error: Class 'DOMDocument'...
votes
If I have PHP script, how can I get the filename of the currently executed file without its extension? Given the name of a script of the form "jquery.j...
votes
I wanted to run some PHP right on my Mac, uncommented httpd.conf, activated web sharing, installed MySQL etc. I can't seem to find my PHP files, most impor...
votes
> This question is intended as a reference for questions about sorting arrays in PHP. It is easy to think that your particular case is unique and worthy of a...
votes
What's the easiest way to profile a PHP script? I'd love tacking something on that shows me a dump of all function calls and how long they took, but...
votes
In Laravel v4 I was able to get the current route name using... <!-- language: php --> Route::currentRouteName() How can I do it in **Laravel...
votes
I know there are a plethora of **$_SERVER** variables headers available for IP address retrieval. I was wondering if there is a general consensus as to how to m...
votes
The following code: $string = "1,2,3" $ids = explode(',', $string); var_dump($ids); Returns the array: array(3)...
votes
// Other variables $MAX_FILENAME_LENGTH = 260; $file_name = $_FILES[$upload_name]['name']; //echo "testing-".$file_name.&qu...
votes
I wonder, what's the easiest way to delete a directory with all its files in it? I'm using `rmdir(PATH . '/' . $value);` to delete a folder,...
votes
How to read if a checkbox is checked in PHP?
votes
1) When an array is passed as an argument to a method or function, is it passed by reference, or by value? 2) When assigning an array to a variable, is the n...
votes
How do I prevent [XSS][1] (cross-site scripting) using just HTML and PHP? I've seen numerous other posts on this topic, but I have not found an article t...
votes
I am getting this error when trying to upload an import on WordPress on my XAMPP local dev environment: Warning: POST Content-Length of 8978294 bytes exceeds...
votes
How to get first 5 characters from string using php $myStr = "HelloWordl"; result should be like this $result = "Hello";
votes
What construct should I use to check whether a value is NULL in a Twig template?
votes
I have a timestamp stored in a session (1299446702). How can I convert that to a readable date/time in PHP? I have tried srttotime, etc. to no avail.
votes
I have a input string like: $str = ':this is a applepie :) '; How can I remove the first occurring `:` with PHP? Desired output: `this is a...