I have a website with index.php. I am using linux
There are several other php files where the index.php file connects to for some functions.
How to get a complete list of all the php files that are called, and whatever times they are called.
How can I see the complete flow chart how the code is running. (I mean which are functions are being called from which php file)
I want to do it through linux command line. I dont want to install any ide. Presently i have vim with vdebug plugin. BUt in that i have to step into the entire code which is very time taking.
Related
I wrote a simple project boostraper using bash.
It asks simple questions such as the parent folder to create the project inside, the type of the project (cli, web php, web symfony, web npm, etc…), the required dependencies, bootstrap everything, init git, and so on.
Then it returns the terminal to the user after changing the working directory to the freshly bootstraped one.
Fine.
I decided to rewrite the whole script using php in order to have a more user friendly cli interface (nice menus, progress bars, etc…) and to be able to pack the whole script in one and only binary (phar).
I struggle with the last part of the script: The one which was the simpliest part of the previous bash script:
cd $newprojectpath
exit 0;
For a reason I can't really figure out, I cannot do the same using a php script.
chdir allows me to change the working directory for the current php process but as soon as it is over, I'm back to working directory from where I invoked the php script (the one from where I spawned the php interpreter sub-process, obviously).
The only way I found in order to achieve this very simple move is to spawn a new shell sub-process from the php script itself.
It works, but I don't like it.
chdir($project->path);
pcntl_exec(getenv('SHELL'));
Did I miss a more simple way to change working directory using PHP cli ?
Since recently I use PhpStorm 2016.3.1 for my php projects. XAMPP works in the background and is connected to the IDE. It's a great IDE but I'm searching for a solution to run a single file in the browser.
The index file of Laravel loads over the run command perfectly. But an individual file makes a problem.
Everytime I want to open the file the browser gets me an error back that the directory to the file is wrong or the classes not found.
How can I setup that for a better workflow?
Ive got some custom Selenium scripts working in a similar way that you might use cURL (theirs a ton of js encryption being done on the POST data on the 3rd party site so it actually more complex to reverse engineer them and use cURL), for these Selenium scripts to work they require PHPUnit, ive gone around trying to install it via the Command line / Pear, but for the life of me cant get it to work.
I noticed you can download all the files as a .zip from the Github page would i run into trouble if i just downloaded them placed them in the same folder as my selenium scripts and linked them up correctly via require() ?
I am running PHP files in my NetBeans with a shell script command. So far so good. I can run individual files without any problem. Sometimes, however, I would like to run all the files in a directory (and it's subdirectories). I tried selecting the directory and hitting the shortcut for "Run" but nothing happens. If I select multiple files and hit "Run" only the last one selected will be run.
I am using the latest NetBeans 7.0.1 on MacOS 10.6. Thanks.
Never heard of such a feature. What I'd do with NetBeans is create a php application and in the main file write some code calling each php file... it will look ugly but I think it's the only way
I just installed Delphi for PHP to get an idea on how it works and have created a simple app with a button that puts a text into a listbox when it is clicked.
The app works if I copy all required files to my webserver and run it from there.
It also works if I save the project in the standard path:
"c:\documents and settings\username\My Documents\Delphi for PHP Projects"
But if I save the project in another directory, the ButtonClick event is not fired when the application runs from there. I've put a breakpoint in the event to see if it stops there but it doesn't.
The OnShow event of the form works as usual.
It really seems to be the path where the project is located to make it either work or not.
As I said, I have no experience with Delphi for PHP so far, it is probably just a simple solution that I don't see...
Your source should be at same driver of your Delphi 4 PHP installation, it is protection against cross site scripting.
So, if you install D4PHP under C:, your code should be under C: as well.
It is not a Delphi 4 PHP limitation, it is how the things works.
You have to deploy your project with Deployment Wizart ;)