I am working on a website in php by using xampp as a local server. Problem is that when a write some code in my css,js,php files there are not updating in browser I am using google chrome and firefox but the problem is same on both browsers. I'm using sublime and Atome my text editors.
Below is screenshot of my text editor and browser which code is display in editor that same code is not showing in browser inspect area
Code is:
Inspect Element:
The PHP code (which is present in your editor but not in your web browser) is never sent to the browser! PHP is a script language for the server side and executed on the server.
This means that PHP is interpreted and executed by a PHP interpreter.
Let's make an example:
<b><?php echo "Hello"; ?></b>
This PHP code would produce the following HTML output (which is visible to your web browser):
<b>Hello</b>
Related
Denar All!
I tried to add to my mail download attribute to download a picture to recipient pc/cell Phone, (right Click, inspect code, Edit html), and it accepts simple codes to "play with", but it just ignores 3 line w3schools code with download attribute. Do I Use the wrong pc or wrong doma in and what should it be like?
Just to add, I tried both options: with an internet photo/seems this would not work either, and with the picture from my own pc. For easy peasy code no result at all, makes me already desperated, is anyone willing to help, thanks in advance!
Using Chrome 84
This is most likely a cross-domain or local resource issue. You can verify this by going to DevTools (Menu -> More Tools -> Developer Tools) and checking for errors in the Developer Console.
Try running a server locally, hosting an html page and image, and pointing the image to the URL that this server is also hosting. Here is one way to do it:
Install node
Node.js quick file server (static files over HTTP)
Within that folder set up the following folder structure:
directory
index.html
image.jpg
Create index.html to have the code you want and point at "./image.jpg" with your w3 code like so:
<a href="./image.jpg" download>
<img src="./image.jpg" alt="W3Schools" width="104" height="142">
</a>
Hit your locally running server and try again: http://localhost/index.html
I have an existing Laravel project, which I want to run in my browser, using VS Code. How do I do this?
There's a built-in terminal in vs code (on a different tab somewhere in the bottom), you can use it to serve your project by a local webserver, with the following command:
php artisan serve
After that you can see your project in your browser (localhost:8000 by default).
Please note this might not work out of the box on Windows.
Firefox - How to enable an HTML file to save itself locally?
I use Firefox to open and edit TiddlyWiki.html files.
https://github.com/Jermolene/TiddlyWiki5
These are HTML with a Javascript app packaged together in one file.
They also have this Firefox extension called TiddlyFox that can enable the TiddlyWiki.html file to save itself locally in the file you just opened. It first asks if you want the this ability to be enabled on that particular file and if you click Yes it works.
I was wondering how this behavior is achieved via the Firefox Extension? (ex source code here: https://github.com/TiddlyWiki/TiddlyFox )
Google Chrome has the filesystem api, i dont know if this is how Tiddly does it but this topic solution shows how to do it in chrome:
http://stackoverflow.com/a/13779352/1828637
Noitidart comment Feb 10 '15 at 3:38
I want to load a pdf file located in upload/grilles/ where upload is located in the root.
My code:
<?php echo $nomFichier; ?>
When I click in the link, codeigniter doesn't want to display the document unlike in a site without framework that display.
Why?
Thanks !
This is not a codeigniter problem, but a browser (Firefox) issue.
I'd recommend the PDF.JS library, which is a general-purpose, web standards-based platform for parsing and rendering PDFs.
note: your above example behave (checked on localhost ) in other browsers than FireFox as follows:
Chrome Version 34.0.1847.137: shows pdf in new window right away
IE 11: asks for permission to show the pdf, if granted shows pdf in new window right away
Safari (for windows) 5.1.7.: shows pdf in new window right away
Opera 12.11: shows pdf in new window right away
So....
It's just my URL.
The file name contains a space, but I injected the name in the url which gave:
localhost/xxxx/yyy/file%20test.pdf
but the url's file is:
localhost/xxxx/yyy/file_test.pdf
Sorry for the inconvenience
GOAL: I'm trying to view the .php page I've edited and "run" the php page.
FYI to avoid conflicts with Skype, I reset the port for XAMPP from 80 to 8080
UPDATED: SYMPTOMS
When I click on RUN I just get the html/php of the page displayed with "result 0"
If i manually browse to the page (//localhost:8080//phpStorm/php_test.php) it runs correctly on the server displaying correctly in the browser.
If I Debug that works correctly too (I had to install Xdebug and configure the php ) (lthough it doesn't automatically display and render the page in the browser.
If I Run the page then it does not load the browser.
I installed xampp (although had to set it to use port 8080 b/c of a port conflict) and it works fine.
BUT I can't figure out what configuration to use in phpStorm.
Here's a Screencast of the problem
WHAT I TRIED
I followed the instructions at the page below and it still doesn't work. I get the same results as above or (if I modify the configuration) phpStorm launches the browser and tries to display my .php page as if it were in the httdoc\ directory. (The Help file made it seem like phpStorm was supposed to copy the file to that directory, but it's not.
http://confluence.jetbrains.com/display/PhpStorm/Installing+and+Configuring+XAMPP+with+PhpStorm+IDE