LMSouq

Knowledge Base

Browse Moodle Solutions

Clear

2110 solutions found in server-meltdown

Page 10 of 106
0 votes
2 ans
24 views
Visual Studio Code PHP Intelephense keeps showing a not existing error

After the latest update of PHP Intelephense that I get today, Intelephense keeps showing an error for an undefined symbol for my route (and other classes too)....

php-dev Solved
AD
asked 5 months ago by Adrian Edy Pratama
0 votes
3 ans
31 views
How to remove /public/ from a Laravel URL

I want to remove the `/public/` fragment from my Laravel 5 URLs. I don't want to run a VM, this just seems awkward when switching between projects. I...

php-dev Solved
US
asked 5 months ago by user1537360
0 votes
3 ans
35 views
How to insert an item at the beginning of an array in PHP?

I know how to insert it to the end by: $arr[] = $item; But how to insert it to the beginning?

php-dev Solved
WE
asked 5 months ago by web
0 votes
3 ans
34 views
Disable Laravel's Eloquent timestamps

I'm in the process of converting one of our web applications from CodeIgniter to Laravel. However at this moment we don't want to add the `updated_at` /...

php-dev Solved
MA
asked 5 months ago by mattcdev
0 votes
3 ans
38 views
PHP: Return all dates between two dates in an array

**Expected Input:** getDatesFromRange( '2010-10-01', '2010-10-05' ); **Expected Output:** Array( '2010-10-01', '201...

php-dev Solved
HY
asked 5 months ago by HyderA
0 votes
3 ans
32 views
Is it possible to delete an object's property in PHP?

If I have an `stdObject` say, `$a`. Sure there's no problem to assign a new property, `$a`, $a->new_property = $xyz; But then I want to remo...

php-dev Solved
VA
asked 5 months ago by valk
0 votes
2 ans
38 views
Convert DateTime to String PHP

I have already researched a lot of site on how can I convert PHP DateTime object to String. I always see "String to DateTime" and not "DateTime...

php-dev Solved
NE
asked 5 months ago by Netorica
0 votes
3 ans
35 views
Doctrine2: Best way to handle many-to-many with extra columns in reference table

I'm wondering what's the best, the cleanest and the most simply way to work with many-to-many relations in Doctrine2. Let's assume that we'v...

general-dev Solved
CR
asked 5 months ago by Crozin
0 votes
3 ans
36 views
Setting Curl's Timeout in PHP

I'm running a curl request on an eXist database through php. The dataset is very large, and as a result, the database consistently takes a long amount of ti...

php-dev Solved
MO
asked 5 months ago by Moki
0 votes
3 ans
36 views
How to check if a value is in a multidimensional array

I use `in_array()` to check whether a value exists in an array like below, $a = array("Mac", "NT", "Irix", "Linux&quot...

php-dev Solved
RU
asked 5 months ago by Run
0 votes
1 ans
31 views
Split string by new line characters

I have a string with new line characters. I want to convert that string into an array, and for every new line, jump one index place in the array. If the stri...

php-dev Solved
JO
asked 5 months ago by Johan
0 votes
3 ans
37 views
Best way to allow plugins for a PHP application

I am starting a new web application in PHP and this time around I want to create something that people can extend by using a plugin interface. How does one...

php-dev Solved
WA
asked 5 months ago by Wally Lawless
0 votes
2 ans
22 views
Composer install error - requires ext_curl when it's actually enabled

I'm trying to install Facebook PHP SDK with Composer. This is what I get $ composer install Loading composer repositories with package informati...

php-dev Solved
MI
asked 5 months ago by Michal Artazov
0 votes
2 ans
38 views
PHP Redirect with POST data

I did some research on this topic, and there are some experts who have said that it is not [possible](https://stackoverflow.com/questions/3045097/php-redirect-a...

php-dev Solved
SH
asked 5 months ago by Shiro
0 votes
3 ans
32 views
What is <=> (the 'Spaceship' Operator) in PHP 7?

PHP 7 introduced the Spaceship (&lt;=&gt;) operator. What is it and how does it work?

php-dev Solved
DE
asked 5 months ago by Deepak Mankotia
0 votes
3 ans
35 views
How to configure XAMPP to send mail from localhost?

I am trying to send mail from localhost. but i am unable to send the mail from localhost so can anybody tell me that how to reconfigure my xampp to send mail...

general-dev Solved
FA
asked 5 months ago by farid shaikh
0 votes
2 ans
37 views
Adding days to $Date in PHP

I have a date returned as part of a MySQL query in the form `2010-09-17`. I would like to set the variables $Date2 to $Date5 as follows: `$Date2 = $Date +...

php-dev Solved
IS
asked 5 months ago by Istari
0 votes
3 ans
36 views
Converting timestamp to time ago in PHP e.g 1 day ago, 2 days ago...

I am trying to convert a timestamp of the format `2009-09-12 20:57:19` and turn it into something like `3 minutes ago` with PHP. I found a useful script to d...

php-dev Solved
WI
asked 5 months ago by willdanceforfun
0 votes
3 ans
37 views
Remove characters that aren't letters and numbers, replace space with a hyphen

I am facing an issue with URLs, I want to be able to convert titles that could contain anything and have them stripped of all special characters so they only ha...

general-dev Solved
US
asked 5 months ago by user115422
0 votes
3 ans
34 views
Creating PHP class instance with a string

I have two classes, `class ClassOne { }` and `class ClassTwo {}`. I am getting a string which can be either `&quot;One&quot;` or `&quot;Two&quot;`. Instead o...

php-dev Solved
JO
asked 5 months ago by Joel