I would like to ask you how to start automatically tailwindcss framework when the PHP project opens on Visual Studio. I'll explain better: first of all i have create a empty directory for my PHP projec in "C:/xampp/htdocs/project_PHP",afterwards i have follow the installation guide of TailwindCSS from the official website (Installation Guide).Next,I created a php file ("index.php") to tested the framework, and all works correctly. The main problem is that: every time I close and open the project from VS, i have to run this command everytime to "start" tailwindcss: 'npx tailwindcss -i input.css -o style.css --watch'. So far I have only been able to start tailwindcss using the npm run build command and setting the script in "package.json"..
Does anyone know if there is a way to start tailwind automatically when opening the project on VS without entering scripts in the terminal?
Thanks in advance everyone for the help :)
Have you tried to go in Tools > Options > Projects and Solutions > PHP or something similar to your project. And select Auto build and refresh browser after saving changes in Auto build and refresh option ?
I know this works for ASP .NET projects. (This will only work if run without debugging though)
Related
I know it sounds basic but I'd really appreciate some help/guidence on how to use phantomjs on my wordpress project. I'm using Windows 8.1 and local host with xampp for now. I've downloaded phantomjs and already tested it via command prompt and got the result (pdf) I want. Now I'd like to use it on my WP project but not sure how to get it started. I've tried to copy phantomjs folder to my wp-content/plugins folder and run exec command but no results at all.
I know there're lots of examples out there on how to run phantomjs but I couldn't find anything for wp.
I need to create a stand alone local window app using web front-end code and PHP.
Noticing that good old TideSDK is completely dead I tried searching around and the only viable option seems to be NW.js and his extension "baconface php-webkit" (https://github.com/baconface/php-webkit). Fact is, I cant even manage to start!
1- I download NW.js for windows and extract the files in a new desktop folder
2- I open a node.js console and execute these commands (https://www.npmjs.com/package/express)
3- I paste php-webkit files into the folder overwriting package.json
4- try to exec NW.exe and just get the message that Express is not present
any help?
Reverse your step 2, and 3. Copy the files into that folder then from there just run a npm install to get all needed dependencies.
I followed your steps except reversing, and it worked for me! Hope this helps.
I'm working with Yii2 and trying to init some migration files. This was working a few months ago, now I'm getting the following error
'yii' is not recognized as an internal or external command
command I'm trying to run is 'yii migrate/create init_my_table
I've been looking around but not exactly sure what the problem is.
Seems like this should be a pretty generic and easy to fix error...
Before i delve into proposing a solution, check if you installed Yii's Basic Template or the Advanced Template.
$ php yii serve
will work for the "basic" template.
Make sure at the Terminal, you have changed to the "basic" directory, then enter the command:
$ php yii serve
OUTPUT
Server started on http://localhost:8080
Document root is "PATH/public_html/yiiproject/basic/web"
Quit the server with CTRL-C or COMMAND-C.
IF you are using the Advanced Template, read this thread and see if the Thread here helps. Read it till the very end:
http://www.yiiframework.com/forum/index.php/topic/68728-php-yii-serve/
Had this same issue but was using the Advanced template.
php yii serve Could not open input file: yii
i tried this command as recommended. It worked:
$ php -S localhost:8000
Hope this helps.
UPDATE FOR ADVANCED TEMPLATE
After installing Composer and Yii, open your Advanced template folder in CLI and run this command:
$ php ./init
This initialization process will setup the project and create necessary files.
Set your document root properly in apache to your /advanced/web/
More Reading to run your project:
http://www.yiiframework.com/wiki/799/yii2-app-advanced-on-single-domain-apache-nginx/
http://www.yiiframework.com/doc-2.0/guide-start-installation.html
Make you that your Environment Variables are set up correctly.
Check out these links:
Similar question
Environment Variables
Relevant parts from links:
To access the environment variables right click the My Computer icon then choose properties. Select the Advanced tab and then click Environment Variables.
window you should see
path :=>...;D:\YOURPATH\xampp\php;D:\YOURPATH\xampp\yii\yiiframework;
Try installing composer globally. I had similar issue but it was resolved after I installed composer via installation file and using my environment variables, I made available globally.
What EXACTLY do I do to run the "Yiic Command line tool"
Open my reg CMD? double click on a certain file?
In the screen cast the tut tells you were going to need to use the Yii command line tool and then the screen instantly cuts to a command line that has some yii related text
My spidey sense is telling me that the answer to this question is going to probably be incredibly obvious and simple , but ive done a decent amount of searching and even if I figure it out I still think this question should be in the books because I know I cant be the only one whos never used a command line tool/was confused about this.
Only started using windows again recently but there should be a yiic.bat located in the framework directory of wherever you extracted yii. You will need to either append this location to your PATH variable or cd into the directory when you want to run yiic. You will also need php installed.
Hope this helps
Some links:
http://www.yiiframework.com/doc/guide/1.1/en/quickstart.first-app
http://www.php.net/manual/en/install.windows.installer.msi.php
http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx
Have just had a quick go myself and seems to work, steps were:
downloaded & installed wamp http://sourceforge.net/projects/wampserver/
watched this vid http://www.youtube.com/watch?v=Rra_UKJRagA
downloaded yii http://www.yiiframework.com/download/
created a frameworks dir in wamp root as in vid and extracted yii to it
edited the yiic.bat to point to the php executable in wamp
opened CMD cd'd to the dir containing yiic.bat and typed "yiic webapp foo"
pressed return and got 'correct response from CMD'
shame the video doesn't have sound but thanks xibian for sharing :-)
If you dont like command-line tools, you can use Gii
http://www.yiiframework.com/doc/guide/1.1/en/topics.gii
Starting from version 1.1.2, Yii is equipped with a Web-based code generation tool called Gii. It supercedes the previous yiic shell generation tool which runs on command line. In this section, we will describe how to use Gii and how to extend Gii to increase our development productivity.
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 ;)