how can php manipulate other php files ?

  • (2 Pages)
  • +
  • 1
  • 2

16 Replies - 1310 Views - Last Post: 20 July 2011 - 12:03 PM Rate Topic: -----

#16 hockey97  Icon User is offline

  • D.I.C Regular

Reputation: -77
  • View blog
  • Posts: 300
  • Joined: 25-September 08

Re: how can php manipulate other php files ?

Posted 20 July 2011 - 11:33 AM

View PostCTphpnwb, on 19 July 2011 - 07:49 AM, said:

From post #1:

View Posthockey97, on 18 July 2011 - 01:33 AM, said:

I will then have a gui interface where the client can add windows or change properties of lets say the body.... to different colors etc. They can also manipulate the php file too... where they can do a mysql query... using my GUI.

To me, manipulating any of the code using the gui would essentially tell the server what code to call up and use, not how to write it. So the initial empty PHP file would let them add preset scripts to it. I don't think this is really necessary since you're really trying to manipulate HTML and CSS.



no and yes... I am trying to manipulate html,css, javascript and php.

My clients will have their own webpage kinda like myspace. the page will be php.

it will echo out html,css,javascript. Yet, I will have a php page called the layout editor.

this will allow the user to customize everything on his page. For example he might be an artist and he uploaded artwork onto my server.

This client might want to create his own gallery artistically. So I would allow him to also upload artwork for the gallery maybe a background image of some old paper. He then would make the layout of the gallery like how he wants it to be. yet, lets say he wants just 5 images to show at one time. Well he would have a GUI interface that he can click a button that sends a variable to my php script on my server. The variable well send something that my server code will understand what it is... and would generate or run a mysql code via that limit where it limits 5 shown at a given time.

so the clients webpage is a php page. It will echo html,css via html, javascript.

the thing is that I want to generate the code myself and then store it in this persons webpage. So it be like as if they programmed it. Yet, they didn't touch a single line of code.

the inputs to my php editor script. It only will accept proper variables.. and will be checked to make sure sql injections and many other hacking possibilities are not coming in.

I would think it be safe since they are not passing any code to my scripts. my GUI won't be passing code but phrases via variables to the script which will understand what operation the script need to do...well what they need to generate and it will save that code inside the persons webpage at the end of the operation of that code.

my problem is I don't know how you can find specific code without having to pass the whole code to a search function via php.

I want to be able to manipulate php,javascript code and html and html css etc and then store the new code or modifications into the file.
Was This Post Helpful? 0
  • +
  • -

#17 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3100
  • View blog
  • Posts: 10,889
  • Joined: 08-August 08

Re: how can php manipulate other php files ?

Posted 20 July 2011 - 12:03 PM

First off, no web page is PHP. It may seem like I'm arguing semantics here, but in attempting to do what you want it's going to be extremely critical that you separate your code. PHP handles the dynamic stuff: user input, accessing the database, etc. I then manipulates HTML, CSS, and Javascript. You want to build up a library of code that you can call at will, and that needs to be mostly HTML, Javascript and CSS. The PHP needs to be generalized enough that it can handle all of the HTML, Javascript and CSS files as templates. That's not a small task but the results could be worth the effort.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2