LMSouq

Knowledge Base

Browse Moodle Solutions

Clear

378 solutions found in general-dev

Page 2 of 19
0 votes
1 ans
3 views
Set a cookie to never expire

Looking at the [php documentation on setting a cookie][1] I see that I can set an expiration date for the cookie. You can set the cookie to expire at the end o...

general-dev Solved
BR
asked 1 month ago by brainimus
0 votes
1 ans
3 views
How to render a DateTime object in a Twig template

One of my fields in one of my entities is a "datetime" variable. How can I convert this field into a string to render in a browser? Here is a co...

general-dev Solved
CH
asked 1 month ago by Chris Ridmann
0 votes
1 ans
3 views
Which version of CodeIgniter am I currently using?

Is there something similar to a `phpinfo()` - that would display the version for CodeIgniter?

general-dev Solved
DI
asked 1 month ago by Dirk
0 votes
1 ans
3 views
Adding one day to a date

My code to add one day to a date returns a date before day adding: `2009-09-30 20:24:00` date after adding one day SHOULD be rolled over to the next month: `1...

general-dev Solved
IA
asked 1 month ago by ian
0 votes
1 ans
3 views
Cannot pass null argument when using type hinting

The following code: ```php class Type { } function foo(Type $t) { } foo(null); ``` failed at run time: > PHP Fatal error: Argument 1...

general-dev Solved
AB
asked 1 month ago by Abdullah
0 votes
1 ans
3 views
Guzzlehttp - How get the body of a response from Guzzle 6?

I'm trying to write a wrapper around an api my company is developing. It's restful, and using Postman I can send a post request to an endpoint like `ht...

general-dev Solved
GR
asked 1 month ago by Greg
0 votes
1 ans
3 views
What is Autoloading; How do you use spl_autoload, __autoload and spl_autoload_register?

I am learning advanced PHP standards and trying to implement new and useful methods. Earlier I was using `__autoload` just to escape including multiple files on...

general-dev Solved
XK
asked 1 month ago by xkeshav
0 votes
1 ans
3 views
how to bypass Access-Control-Allow-Origin?

I'm doing a ajax call to my own server on a platform which they set prevent these ajax calls (but I need it to fetch the data from my server to display retr...

general-dev Solved
ET
asked 1 month ago by ETAN
0 votes
1 ans
3 views
How to read GET URL parameter?

I'm trying to pass a URL as a URL parameter in PHP but when I try to get this parameter I get nothing I'm using the following URL form: http:/...

general-dev Solved
FE
asked 1 month ago by Feras Odeh
0 votes
1 ans
3 views
Advantages/disadvantages of using cookies to store a user ID?

For the sake of creating a login system for my website, I read about cookies and sessions and their differences (cookies are stored in the user's browser an...

general-dev Solved
NA
asked 1 month ago by Nadjib Mami
0 votes
1 ans
3 views
Get value from SimpleXMLElement Object

I have something like this: $url = "http://ws.geonames.org/findNearbyPostalCodes?country=pl&placename="; $url .= rawurlencode($city[$i...

general-dev Solved
KU
asked 1 month ago by kubas
0 votes
1 ans
3 views
Sending POST data in Android

I'm experienced with PHP, JavaScript and a lot of other scripting languages, but I don't have a lot of experience with Java or Android. I'm look...

general-dev Solved
OM
asked 1 month ago by OMGKurtNilsen
0 votes
1 ans
3 views
Test if number is odd or even

What is the simplest most basic way to find out if a number/variable is odd or even in PHP? Is it something to do with mod? I've tried a few scripts but...

general-dev Solved
US
asked 1 month ago by user1022585
0 votes
1 ans
3 views
How do I create a simple 'Hello World' module in Magento?

How can the following be accomplished in Magento? - Display a "Hello World" message using a controller/view/model approach. So, if I went to `http:...

general-dev Solved
AL
asked 1 month ago by Ali
0 votes
1 ans
3 views
"Keep Me Logged In" - the best approach

My web application uses sessions to store information about the user once they've logged in, and to maintain that information as they travel from page to pa...

general-dev Solved
MA
asked 1 month ago by Matthew
0 votes
1 ans
3 views
Why check both isset() and !empty()

Is there a difference between `isset` and `!empty`. If I do this double boolean check, is it correct this way or redundant? and is there a shorter way to do the...

general-dev Solved
SI
asked 1 month ago by silow
0 votes
1 ans
3 views
What is the size limit of an HTTP POST request?

Sorry if this is duplicate,I would think it would be but couldn't find anything. I have a flex application that I am posting data back to a PHP/MySQL ser...

general-dev Solved
IN
asked 1 month ago by invertedSpear
0 votes
1 ans
3 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 1 month ago by Crozin
0 votes
1 ans
3 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 1 month ago by farid shaikh
0 votes
1 ans
3 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 1 month ago by user115422