php Questions

5

I have a long string in php which does not contain new lines ('\n'). My coding convention does not allow lines longer than 100 characters. Is there a way to split my long string into multiple lin...
Mushy asked 18/8, 2009 at 12:2

5

Solved

I am performing a search in an XML file, using the following code: $result = $xml->xpath("//StopPoint[contains(StopName, '$query')]"); Where $query is the search query, and StopName is the na...
News asked 9/3, 2009 at 12:12

5

Solved

I have an editable form for my website orders and I have these fields: User quantity note status I also have other options in this form, but only these fields are important to me in order to be a...
Castilian asked 23/7, 2017 at 18:21

10

I have several method to transform php array to csv string both from stackoverflow and google. But I am in trouble that if I want to store mobile number such as 01727499452, it saves as without fir...
Percolate asked 3/5, 2013 at 6:0

10

Solved

I'm trying to parse a CSV string to an array in PHP. The CSV string has the following attributes: Delimiter: , Enclosure: " New line: \r\n Example content: "12345","Computers","Acer","4","Varta...
Amphiboly asked 20/7, 2013 at 10:18

9

Solved

I'm using Laravel to build a package which will include some Admin functionality and will include some other packages. I have included a package which has migrations and a config file, But how do ...
Mullein asked 30/3, 2016 at 17:58

3

Solved

So I have this JSON Array: [0] => 238 [1] => 7 [2] => 86 [3] => 79 [4] => 55 [5] => 92 [6] => 55 [7] => 7 [8] => 254 [9] => 9 [10] => 75 [11] => 238 [12] => ...
Demonstrative asked 3/6, 2015 at 17:24

8

I have recently installed MySQL and phpMyAdmin, but when I try to login to phpMyAdmin with the root credentials I get the following error for this query: SQL query: SET lc_messages = 'en_US'; M...
Topgallant asked 28/6, 2016 at 19:12

3

Today I noticed something disturbing while inspecting session files in storage/framework/sessions folder created by Laravel 5. Here is what happened: I logged in as user A I navigated to a page...
Capelin asked 9/6, 2015 at 9:53

3

Solved

I just need help on this PHP error which I do not quite understand: Fatal error: Cannot pass parameter 2 by reference in /web/stud/openup/inactivatesession.php on line 13 <?php error_reportin...
Hypotenuse asked 28/10, 2012 at 0:29

3

Solved

I'm looking into Laravel Echo (With socket.io as connector) But I can't find out how to bind a callback when user/visitor succeed or not connecting to the socket (Not channel), but generally if co...
Bader asked 22/9, 2017 at 8:42

13

Solved

I have various HTML strings to cut to 100 characters (of the stripped content, not the original) without stripping tags and without breaking HTML. Original HTML string (288 characters): $content ...
Clubfoot asked 8/3, 2010 at 1:1

14

Solved

I am using Google's php api client. I am running through the quickstart guide for service accounts. I followed the steps perfectly (as far as I can tell). I am running into the following error: { ...
Sannyasi asked 2/1, 2018 at 6:17

5

Solved

I am trying to upload a file to two different locations. The lcoations being /2x/ adn /3x/. It uploads the file on 3x but doesn't on 2x and throws this error: The file was not uploaded due to an...
Enchant asked 7/7, 2017 at 7:24

3

Solved

I get a bit confused over all the nice things laravel has to offer in terms of the IOC container and facades. Since I'm not an experienced programmer it gets overwhelming to learn. I was wondering,...
East asked 10/8, 2014 at 13:28

7

Solved

I know we can use PHP DOM to parse HTML using PHP, but I have a specific requirement. I have an HTML content like below <p class="Heading1-P"> <span class="Heading1-H"...
Indignity asked 21/8, 2013 at 4:55

11

I'm making this program and I'm trying to find out how to write data to the beginning of a file rather than the end. "a"/append only writes to the end, how can I make it write to the beginning? Bec...
Cordy asked 19/11, 2009 at 2:30

5

i want to use Rector for refactoring my code because i update my project to symfony 5.4 to 6.1. My php project version : 8.1.5 So, i want to use a simple rule who change my annotation to attribut w...
Unroof asked 3/8, 2022 at 10:9

10

Solved

It's a capital A with a ^ on top: Â It is showing up in strings pulled from webpages. It shows up where there was previously an empty space in the original string on the original site. This is the...
Steppe asked 25/8, 2011 at 7:27

4

This is the extension that I am trying to install: https://github.com/EVODelavega/phpkafka The messages passed to the queue should be in JSON format. Currently, I am getting installation errors...
Duron asked 6/12, 2017 at 14:16

4

Solved

I am developing a web application that involves the feature of uploading image to server. I am using Laravel. The problem is when I upload a photo, Laravel is rotating the image. This is my code ...
Commutative asked 10/5, 2018 at 16:43

11

http://localhost/laravel/app/tests/ExampleTest.php if i run laravel it shows the following error Fatal error: Class 'TestCase' not found in D:\xampp\htdocs\laravel\app\tests\ExampleTest.php on l...
Buffet asked 12/2, 2014 at 11:41

7

Solved

No one is able to submit forms, I took a look at it and I’m getting a POST 500 Internal Server Error. POST http://carlsbad4rent.com/wp-json/contact-form-7/v1/contact-forms/321/feedback 500 (In...
Lyse asked 28/11, 2017 at 10:29

10

Solved

I am trying to show my markdown email on view, but there's something wrong on my mail view, it shows like ErrorException in FileViewFinder.php line 112: No hint path defined for [mail]. (View: /opt...
Kulp asked 17/2, 2017 at 4:18

2

I want to ask if both are the same and if not, where's the difference between them: /** * @param int|null $id Any id. */ public function testSomething(int $id = null) {} and /** * @param int|nu...
Manor asked 23/9, 2020 at 8:54

© 2022 - 2024 — McMap. All rights reserved.