Questions tagged [php]
PHP is a widely used, high-level, dynamic, object-oriented, and interpreted scripting language primarily designed for server-side web development. Used for questions about the PHP language.
1,396,689
questions
0
votes
0answers
6 views
Laravel: reload page after redirecting back
I am using Laravel and VueJS. I have a function with
return redirect()->back()->with('success', 'Saved!');
that returns to a page after a form is submitted.
The form is submitted with this.$...
0
votes
0answers
20 views
Why isn't SESSION working properly in my PHP script?
I'm new to php, and I'm learning about sessions. I have this script which I have written where the user tries to login and I want a session to start for each type of user, an administrator and a ...
0
votes
0answers
10 views
Composer won't install due to strange syntax in composer.json: “package/package”: “other-package as x.xx.x”
I have this bizarre syntax in a project's composer.json file that my company took over. Because of it, I can't install my packages. Apparently this project could composer install no problem before we ...
0
votes
0answers
5 views
Wordpress 401 error: rest_forbidden. Sorry, you are not allowed to make proxied oEmbed requests
I'm getting 401 error on the following URL call on my Wordpress hosted on Windows IIS server:
https://example.com/wp-json/oembed/1.0/proxy?url=https://example.com/wp-content/uploads/img.jpg
{"...
-2
votes
1answer
12 views
Paint the active category with a different color
I have a taxonomy-blogs_taxanomy.php file. Inside the file, I display the category names and also go to them by reference. Now I need to make sure that the active category in which I am is closed with ...
1
vote
0answers
12 views
Filter do not apply Wordpress
I have got a filter in tab. I use motors theme. Filter has to redirect on main filter's page with applied options. It redirects and options are applied in list but link is not changed (it should be ...
0
votes
0answers
15 views
Upload object to AWS S3 with a presigned URL
I would like to upload large files, via a dropzone, in an s3 bucket.
I get a presigned URL via a RESTful api (presigned URL PutObject) in an Ajax function.
PHP ajax function code :
$API_url = api_url;
...
-1
votes
0answers
22 views
Getting Undefined Index: one Error. Areas to troubleshoot? [duplicate]
Delete Method.
<?php
if(!$conn){
echo mysqli_error($conn);
}
//if (isset ($_GET['a']) == "delete") { // This is incorrect
if (isset ($_GET['a']) && $...
0
votes
0answers
5 views
allowed_types tud not support by Codeigniter 3
I am trying to upload .tud file type by codeigniter3 upload library. $configs['allowed_types']='tud|png'; Png only allowd but not tud. when try to upload tud file, It shows error that
The filetype ...
0
votes
0answers
10 views
PHPUnit Class not found even though it is defined
I'm trying to unit-test my class-function using PHPUnit, but I keep running into Class not found error, even though it is present.
Here's my func.php where the class is defined:
<?php
class func {
...
-1
votes
0answers
11 views
doctrine entities reusability
I would like to understand the best practices to create symfony bundles, I've checked this page : https://symfony.com/doc/3.3/bundles/best_practices.html#classes
We can read here that doctrine ...
0
votes
1answer
10 views
Symfony3 validation error: This value is not valid
When I updated from Symfony 2 to 3 and tried to save the data from the form, I got a validation error that the author is not valid.
However, the author was an int type and was the same as in Symfony2.
...
-3
votes
0answers
13 views
this code is php : $time = round(microtime(true) * 1000); equivalent in Node.Js? [duplicate]
this code is php :
$time = round(microtime(true) * 1000);
please write equivalent in Node.Js?
0
votes
0answers
15 views
Wordpress comments.php conditional
I am new and probably dangerous at editing php. First time posting a question here, don't know if this is too much to ask. I understand if so.
I have thrown together a custom child theme comments.php ...
-2
votes
0answers
16 views
SQL server User data with different column based on role [closed]
I am new at sql and needed to create a database for a small ecommerce app,
in the app there will be some role(seller, buyer, admin. etc) with different column and i plan to make the database look more ...