LMSouq

Knowledge Base

Browse Moodle Solutions

Clear

2110 solutions found in server-meltdown

Page 6 of 106
0 votes
2 ans
56 views
Remove multiple whitespaces

I'm getting `$row['message']` from a MySQL database and I need to remove all whitespace like `\n` `\t` and so on. $row['message'] = &...

general-dev Solved
CR
asked 5 months ago by creativz
0 votes
2 ans
37 views
How do I see the extensions loaded by PHP?

It's got to be somewhere in the phpinfo() dump, but I just don't know where. Is it supposed to be under the "Additional Modules" section? So...

php-dev Solved
BI
asked 5 months ago by Bialecki
0 votes
3 ans
33 views
Fastest way to convert string to integer in PHP

Using PHP, what's the fastest way to convert a string like this: `"123"` to an integer? Why is that particular method the fastest? What happens...

php-dev Solved
NI
asked 5 months ago by nickf
0 votes
2 ans
41 views
How to remove the querystring and get only the URL?

I'm using PHP to build the URL of the current page. Sometimes, URLs in the form of www.example.com/myurl.html?unwantedthngs are requested. I want...

database Solved
NA
asked 5 months ago by Navi Gamage
0 votes
2 ans
40 views
How to query between two dates using Laravel and Eloquent?

I'm trying to create a report page that shows reports from a specific date to a specific date. Here's my current code: $now = date('Y-m-d&#39...

database Solved
WO
asked 5 months ago by wobsoriano
0 votes
3 ans
35 views
PHP check whether property exists in object or class

I understand PHP does not have a pure object variable, but I want to check whether a property is in the given object or class. $ob = (object) array('...

php-dev Solved
MI
asked 5 months ago by Micah
0 votes
3 ans
30 views
What's the net::ERR_HTTP2_PROTOCOL_ERROR about?

I'm currently working on a website, which triggers a ```net::ERR_HTTP2_PROTOCOL_ERROR 200``` error on Google Chrome. I'm not sure exactly what can provo...

general-dev Solved
TR
asked 5 months ago by Tristan G
0 votes
2 ans
40 views
413 Request Entity Too Large - File Upload Issue

I am trying to upload 30MB file on my server and its not working. 1. When I upload 30MB file, the page loads "**Page Not Found**" 2. When I uplo...

general-dev Solved
RA
asked 5 months ago by Raju Vishwas
0 votes
3 ans
23 views
Fatal error: Class 'ZipArchive' not found in

I have a problem when I install 'Archive_Zip 0.1.1' on the Linux server, but when I try to run the script to create the zip file it gives the fatal erro...

php-dev Solved
PA
asked 5 months ago by Parag Chaure
0 votes
3 ans
33 views
How to include() all PHP files from a directory?

In PHP can I include a directory of scripts? i.e. Instead of: include('classes/Class1.php'); include('classes/Class2.php'); is...

php-dev Solved
OC
asked 5 months ago by occhiso
0 votes
2 ans
33 views
What is the meaning of three dots (...) in PHP?

While I am installing Magento 2 on my Server, I got an error. After investigating the code and found that there are three dots (`...`), which is producing the e...

php-dev Solved
AB
asked 5 months ago by abu abu
0 votes
3 ans
31 views
Laravel PHP command not found

I installed Laravel using Composer without problems, but when I try to run `laravel` in the terminal, I get the following error: > -bash: laravel: command...

php-dev Solved
CH
asked 5 months ago by chemitaxis
0 votes
2 ans
37 views
Send attachments with PHP Mail()?

I need to send a pdf with mail, is it possible? $to = "xxx"; $subject = "Subject" ; $message = 'Example message with...

php-dev Solved
US
asked 5 months ago by user1537415
0 votes
3 ans
26 views
Fatal error: Class 'SoapClient' not found

I'm trying a simple web service example and I get this error even though I uncommented `extension=php_soap.dll` in the `php.ini` file: > **Fatal error...

php-dev Solved
FI
asked 5 months ago by Figen Güngör
0 votes
3 ans
34 views
Force SSL/https using .htaccess and mod_rewrite

How can I force to SSL/https using .htaccess and mod_rewrite page specific in PHP.

server-admin Solved
SA
asked 5 months ago by Sanjay Shah
0 votes
2 ans
33 views
Get random item from array

$items = Array(523,3452,334,31,...5346); Each item of this array is some number. **How do I get random item from `$items`?**

php-dev Solved
JA
asked 5 months ago by James
0 votes
2 ans
34 views
Tactics for using PHP in a high-load site

Before you answer this I have never developed anything popular enough to attain high server loads. Treat me as (sigh) an alien that has just landed on the plane...

php-dev Solved
RO
asked 5 months ago by Ross
0 votes
2 ans
40 views
How to get current route in Symfony 2?

How do I get the current route in [Symfony][1] 2? For example, `routing.yml`: somePage: pattern: /page/ defaults: { _controller: &quot...

general-dev Solved
IL
asked 5 months ago by IlyaDoroshin
0 votes
2 ans
47 views
How to prevent form resubmission when page is refreshed (F5 / CTRL+R)

I have a simple form that submits text to my SQL table. The problem is that after the user submits the text, they can refresh the page and the data gets submitt...

general-dev Solved
US
asked 5 months ago by user701510
0 votes
2 ans
36 views
Correctly determine if date string is a valid date in that format

I'm receiving a date string from an API, and it is formatted as `yyyy-mm-dd`. I am currently using a regex to validate the string format, which works ok,...

php-dev Solved
MA
asked 5 months ago by Marty Wallace