See php generated code

Question:
Hello, is there a way to open tab showing code generated by my php script?
I’m writing PHP to generate SVG and it would be just perfect to have three columns beside each other - PHP code , generated SVG code , Webview with SVG graphic
Thanks

Replit Profile: https://replit.com/@morys42

1 Like

Hi @morys42, welcome to the forums!

Can you please send your Repl link by following the below guide? This way we can see your code and the contents of your files.

1 Like

Nevermind, I think I found your Repl: https://replit.com/@morys42/IntrepidWarpedClasslibrary

Can you please explain better what you mean? What do you mean by “generated SVG code”?

1 Like

What I mean is basically to see the source code of what’s displayed in webview. Ideally to have my editted php code on the left, when I execute it, I will see the code it outputs in the middle, which will be svg graphic, and on the right I have Webview of that graphic.
Right now I would have to open Webview in new browser tab and view it’s code, not ideal for debugging.
I want to generate parametric graphic with my students, who are beginners at coding, so I want to make it as easy and straightforward for them as possible.

Oh, I see, because PHP really generates HTML. I forgot :sweat_smile:

You could just have your PHP code open in one tab (of your browser, not the Editor), your website in another tab, and then press Ctrl + U to open the source code of that. Then just refresh the website and source code whenever you make changes.

Or if you really want it to all be in the Editor, you could write an Extension for it.

Well, I feared it will come to this … unfortunately, making the extension is beyond my skill and time options right now, so I will have to find another way how to get there (probably will try to find another editor that allows it … pitty, this looked promising)

It isn’t that hard…I’ll make it right now. Just a simple page that refreshes every bit, lol

Edit: Nevermind, realized making Extensions are harder than I thought. Still, I think someone else could make it.

He he, thanks for the effort though :wink:
For the time being I am using this editor with my students, it splits screen horizontally, which I don’t like too much, and also you have to manually switch between code and graphical output, but it gets the work done, allowing beginners to code PHP without installing PHP server locally or uploading files onto webserver every time