PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, February 16, 2022

[FIXED] eval() in laravel not executing the string

 February 16, 2022     eval, laravel-5.4, mysql, php     No comments   

Issue

My database table contains an eloquent query click here to see Database Table Snapshot .I have fetched the query from database.Now problem is that I'm unable to execute the query that is in the collection. I have Tried eval() to execute the query present the collection.But eval() is not executing it.

  eval("\"$tempdata\";");

$tempdata contains the query that is in the database table.


Solution

You need to add return when using eval.

Try:

eval("return $tempdata;");


Answered By - Rwd
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing