php Questions

4

Solved

I am trying to create a constant name dynamically and then get at the value. define( CONSTANT_1 , "Some value" ) ; // try to use it dynamically ... $constant_number = 1 ; $constant_name = ("CONST...
Tammy asked 22/10, 2010 at 8:44

9

Solved

I've seen a few Bitcoin Address form validation scripts for various languages, but surprisingly can't really find anything for two common web languages, Javascript and PHP. Here's one for Python,...
Rollmop asked 4/2, 2014 at 17:57

14

UPDATE ON THE PROBLEM: On some browsers, we have two PHPSESSIDs. One PHPSESSID is not set by me anywhere in my script It has HOST (instead of DOMAIN for the PHPSESSID I set) as www.mywebsite.com ...
Missive asked 4/11, 2015 at 9:24

2

Solved

Here is the code with PHP annotations /** * @ORM\Table(name="telegram_accounts", schema="users", indexes={ * @ORM\Index(name="subscriber_notification_idx", columns={...
Immediate asked 9/3, 2022 at 14:46

5

Solved

I am trying to generate an XML file in a PHP web application: <?php ... header('Content-Type: application/xml'); header('Content-Disposition: attachment; filename=test.xml'); echo "<?xml ve...
Westwardly asked 22/3, 2013 at 19:20

13

I have an array: require_once ('config.php'); require_once ('php/Db.class.php'); require_once ('php/Top.class.php'); echo "db"; $db = new Db(DB_CUSTOM); $db->connect(); $res = $db->getRes...
Canon asked 22/5, 2013 at 9:26

5

Solved

How to fix this error in Termux? Android 9 pie u0_a197@localhost /d/d/c/f/u/e/apache2> apachectl start [Mon Feb 24 10:44:37.594174 2020] [php7:crit] [pid 27013:tid 508989617480] Apache is runni...
Lenka asked 24/2, 2020 at 5:26

1

I've follow the implementation of filters with annotation to load only the sources concern for one user. Very usefull, work properly. https://api-platform.com/docs/core/filters/#using-doctrine-fil...
Unclassical asked 23/11, 2018 at 19:35

4

Solved

Let's say we have an array, and we try to get the value of a key which does not exist: $arr = ['a', 'b']; $val0 = $arr[0] ?? null; $val1 = $arr[1] ?? null; $val2 = $arr[2] ?? null; Because o...
Petulant asked 16/2, 2018 at 12:18

2

Solved

A quick query regarding some data model relations in Laravel. I have a product, that belongs to a user, but a user can have many products. But a product can also have many people making an offer o...
Lang asked 10/5, 2017 at 15:0

5

Solved

I want to download (or simply file_get_contents) for 5 places. I wait say 1.2 sec for each that means in total 1.2X5=6 seconds. I want to save waiting time. I thought I could wait 1.3 sec is enough...
Piliferous asked 28/10, 2010 at 18:37

8

I'm trying to finish up a URL router that I created for my custom MVC framework. I have a list of parameters that I dissected from the URL, but the problem is that they only have numerical keys. Wh...
Gifferd asked 14/12, 2011 at 8:30

12

I've installed the plugin and Its displaying the countries correctly and working fine, but when I submit the form that has the input of type = "tel", the form does not submit the country code, I do...
Hamulus asked 28/1, 2017 at 14:15

8

Solved

I'm getting this at the bottom of my page, where the debug bar should be. What is the problem? This request: http://localhost:81/xxx/web/debug/default/toolbar?tag=5578f180963e82.28312577 is retur...
Hamm asked 11/6, 2015 at 2:26

7

Solved

I tried checking all the names. It is working fine in php 5.3 but not working in php 5.5 An uncaught Exception was encountered Type: RuntimeException Message: C:\xampp\htdocs\project\appli...
Avalos asked 4/1, 2016 at 12:58

7

Solved

I am using ReSTful webservice. I am uploading multiple photos with one function (PHP). I have used $num_files = count($_FILES['myfile']['name']) to count number of files that are to be uploaded bu...
Vietnamese asked 28/1, 2015 at 5:31

15

Solved

I don't have any problem on localhost. but when i tested my codes on server, end of every page i see this notice. my code: <?php ob_start(); include 'view.php'; $data = ob_get_contents(); ob_...
Concentrated asked 1/8, 2016 at 8:18

5

Solved

I am making simple API with Laravel 5.4 and I have problem. I created routing and some data for tests but when I testing if routing work properly with Postman by putting localhost:8888/{projectname...
Platonic asked 25/7, 2017 at 5:34

9

Solved

I created a login page with codeigniter,but i get the php message. Message: ini_set(): A session is active. You cannot change the session module's ini settings at this time how to fix this? vie...
Deron asked 28/9, 2015 at 2:23

5

Solved

How do you write a PHP arrow function with multiple line expressions? JavaScript one-liner example: const dob = (age) => 2021 - age; PHP one-liner equivalent: $dob = fn($age) => 2021 - $age;...
Theresatherese asked 26/1, 2021 at 15:6

7

I need to validate just one field (called 'Instance') to accept lowercase ASCII letters and numbers only, the first character also has to be a letter not a number. It will accept uppercase characte...
Foulard asked 4/4, 2014 at 9:7

4

I did a fresh installation of Ubuntu and after installing Yii2 etc I can't seem to be able to run codecept anymore. I'm using Yii2. I required the latest codecept version in composer.json which is...
Workroom asked 23/5, 2015 at 13:42

4

Solved

I am using PHP 5.5.25 with Apache 2.4 on Windows 7 x64 and I am unable to activate the cURL module. I have looked around and tried all I could think of. Please assist: In php.ini, the line extens...
Humane asked 10/9, 2015 at 5:1

7

Solved

Bellow is my site directory structure: htdocs/ My-Project/ public/ index.php css/ img/ js/ src/ config.php templates/ library/ I do not want any direct user access to any files inside...
Graehme asked 13/5, 2014 at 15:40

3

Solved

I have both xdebug and PHP_CodeSniffer (PHPCS) working great on my installation of PHPStorm, but the one really annoying part is that the debugger now seems to be treating Code Sniffer errors as br...
Quiroz asked 17/7, 2012 at 17:49

© 2022 - 2024 — McMap. All rights reserved.