PHP (Linux): list the files that have been executed

I'm debugging fairly complex PHP/AngularJS application written in custom framework. Documentation is almost non-existent and there is are no clear naming and folder conventions. The biggest challenge for me is finding which files were executed in a p

WordPress - The IF statement does not work in archive.php

I'm looking to add a simple IF statement to check whether a custom field is selected, and if so, add the code 'display:none'. I have the code I want to add: if( get_field('my_custom_field') ) { echo ""; } else { echo "style='display:none'&q

Problems iterating objects in the array

I have this method below which is responsible for bringing me an array of objects (blog). public function getListaBlogsById($id) { $result = array(); try { $statement = $this->getDb()->prepare('SELECT * FROM Blog WHERE categoria_id = :id'); $stateme

Cryptographically secure random string function

Goal: Find the most cryptographically secure random string generator. Using Alphabetic, numeric and if possible special characters in the string. I have been reading on here and other places, but I still hear so many different answers/opinions. Can p

Replace class filters in woocommerce

I am trying override a function from class WC_Admin_Post_Types and tried something like this: plugins/customization/wc_admin_post_types_new.php class WC_Admin_Post_Types_new { public function __construct() { add_filter( 'views_edit-product', array( $

My ajax call does not pull dynamic data from PHP / Mysql

Hello: I am working on a project where I am going to have divisions from a league listed as buttons on a page. And when you click on a button a different team list shows for each division. All divisions and teams are stored in a mysql database and ar

Arrays of PHP objects get the key

I'm studying how objects and arrays work in PHP for a little project. Unfortunately it's difficult to find out what are good ways to deal with data, there are many solutions but i can't find the right solution for my problem. I think I prefer two wor

search for php () password-check equivalent c # ()

I need to import a bunch of user accounts Moodle into a system written in c#. Moodle uses password_hash() function to create hashes of passwords. I need to be able to verify these passwords in c#. In other words I looking for a c# implementation of P

Setting PHP cookies

I hate to say it but I have been working on what should have been a 30 minute assignment for a good 6 hours now with little to no progress. I am attempting to capture a name and email in a form, and set them to cookies that will last 10 minutes. Whil

Relative path in a PHP project

I'm working on a PHP project, and I have a problem with a file path in a require_once. The folder structure for the 2 files is this: - Library Example currentpage HTML2PDF file to include in the "currentpage" I have a require_once ('../HTML2PDF/

Switch Modal Bootstrap with php trigger

I need to trigger a Bootstrap modal if a PHP GET url is set but I don't know how to. The PHP code look's like this: <?php if ($_GET['activate']) { $activate = $_GET['activate']; mysql_query("UPDATE `users` SET `active` = 1 WHERE `email_code` = '$a

PHP gets the file path of an image?

Example: The image url: localhost/example/folder/filename.jpg I want to get path of the image so it must be: localhost/example/folder/ How to do that? I speak English not well. Thanks! I have found a solution instead of using dirname: $image = 'local

HTTP POST using Angular.js

I'm new to the scene and I want to use Angular.js to make an HTTP POST request. I'm accessing PHP scripts which have parameters that are just POST variables. What gets returned from each script is a JSON string. Normally in an HTML form you can make

How to add JavaScript to the PHP WordPress file?

I would like to reference JavaScript files from my root folder in a WordPress PHP file, however when I load the page, the JavaScript is being ignored. Is there a WordPress restriction on referencing .js files? Am I not correctly referencing JavaScrip

Overflow: hidden - & gt; PHP DIV scrolling?

So I have a website that navigates by scrolling through a pane of DIVs that's wrapped inside a main DIV via. JQuery/javascript: E.g. <div id="content" style:"overflow:hidden; width 800px;"&

How do you check if textarea is empty

I have a form containg three text inputs and one text area. On the php page that processes the form, I want to check first to make sure the user entered something (input field is not empty) before processing the form. I'll just provide a skeleton of

Ubuntu - Eclipse & amp; Netbeans alternative

I'm a php developer and I'm looking for an alternative to eclipse and netbeans. Both don't run great on Ubuntu 11.04. Any recommendations?PHPStorm Very smart IDE, PHP+css+JS, Inspections (it's very useful thing), smart autocomplete, plugins (svn, git

jQuery: load the body of the page into the variable

I'm using jQuery to load the result of a PHP script into a variable. The script is passed something that the user typed with a GET request. I want to take just what the script spit out into its <body> tag. Here's what I've tried: JS: function loader

Fgets () but on a string instead of a file?

I can do the following: $fopen = fopen($file_name, 'r'); $data = fgets($fopen, 16384); fclose($fopen); But is their any way I could emulate the same functionality but on a string (instead of using a file name)? $string = file_get_contents($file_name)

How can I get the destination URL using cURL?

How can I get the destination URL using cURL when the HTTP status code is 302? <?PHP $url = ""; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $html = curl_e