/    Sign up×
Community /Pin to ProfileBookmark

Stop Editing my PHP!!!!

Looking for a good way to keep the other web devs at our work
from mucking up my code. It’s a real pita spending fourth months
on doing something (html, JS, php) then have another guy come
in and switch things around on me. Any way to store a website
in one script? Encrypt? Something?! :rolleyes:

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@ehimeauthorMay 18.2009 — Idea i just thought up, is it viable?

Host my actual PHP writing files somewhere completely different,

another server most likely. On my pages, just write the vars I

will need, pass those vars to that other domain, then echo the

code back?

Something like this maybe?

[code=php]
<?php $pl="Planet Galaxy"; $ps="pgy"; $url="lasers"; $src="lasers/djclub"; $num="5"; $obj="Planet-FV1.swf"; ?>
<?php include ("php/pwriter.php");?>
[/code]


and

[code=php]
<?php $img="images/products/".$src."/"; $adr="layers/".$url."/pcons/"; $ext=$ps."-";
function qq($text) {return str_replace('`','"',$text); }
function printq($text) { print qq($text); }

printqn("<div class='frame'><div class='content'><img class='figure border' src='".$img;.$ext;."-01.jpg' width='250px' height='250px' />");
printqn("<div class='iePaddingFix'><h3>".$pl;."</h3>");
printqn("<embed id='swfobject' height='250' width='250' style='float:right;' allowscriptaccess='always' wmode='transparent' quality='high' bgcolor='#ffffff' name='swfobject' src='http://omnisistem.com/swfobject/vdo/".$obj;."type='application/x-shockwave-flash' />");
printqn("<div class='box'>");

$i = 1;
while ($i <= $num) {
printqn("<a href='".$adr;.$ext;.$i;.".jpg' rel='lytebox'><img src='".$adr;.$ext;.$i++;."-sm.jpg' height='50px' width='50px'></a>");
/* the printed value should be $i before the increment (post-increment) */
}
echo ("</div></div></div>");

printqn("<center class='tbar'><div class='tab'><a href='".$adr;.$ext;."-sp.php'>Specifications</a></div><a href='".$adr;.$ext;."-i.php'>Information</a></div><a href='".$adr;.$ext;."-m.php'>Maintenance</a></div><a href='".$adr;.$ext;."-s.php'>Safety</a></div><a href='".$adr;.$ext;."-t.php'>Troubleshooting</a></div>");
printqn("<div id='iDisplay'></div>");
?>
[/code]


Would output this hopefully

[code=html]
<div class="frame">
<div class="content">

<img class="figure border" src="images/products/lasers/djclub/pgy-01.jpg" width="250px" height="250px" />
<div class="iePaddingFix">
<h3>Planet Galaxy</h3>
<embed id="swfobject" height="250" width="250"
style="float:right;" allowscriptaccess="always"
wmode="transparent" quality="high" bgcolor="#ffffff"
name="swfobject" src="http://omnisistem.com/swfobject/vdo/Planet-FV1.swf"
type="application/x-shockwave-flash" />

<div class="box">
<a href="images/products/lasers/djclub/pgy-01.jpg" rel="lytebox"><img src="images/products/lasers/djclub/pgy-01-sm.jpg" height="50px" width="50px"></a>
<a href="images/products/lasers/djclub/pgy-02.jpg" rel="lytebox"><img src="images/products/lasers/djclub/pgy-02-sm.jpg" height="50px" width="50px"></a>
<a href="images/products/lasers/djclub/pgy-03.jpg" rel="lytebox"><img src="images/products/lasers/djclub/pgy-03-sm.jpg" height="50px" width="50px"></a>
<a href="images/products/lasers/djclub/pgy-04.jpg" rel="lytebox"><img src="images/products/lasers/djclub/pgy-04-sm.jpg" height="50px" width="50px"></a>
<a href="images/products/lasers/djclub/pgy-05.jpg" rel="lytebox"><img src="images/products/lasers/djclub/pgy-05-sm.jpg" height="50px" width="50px"></a>
</div>
</div>
</div>

<center class="tbar">
<div class="tab"><a href="layers/lasers/pcons/pgy-sp.php">Specifications</a></div>
<div class="tab"><a href="layers/lasers/pcons/pgy-i.php">Information</a></div>
<div class="tab"><a href="layers/lasers/pcons/pgy-m.php">Maintenance</a></div>
<div class="tab"><a href="layers/lasers/pcons/pgy-sa.php">Safety</a></div>
<div class="tab"><a href="layers/lasers/pcons/pgy-t.php">Troubleshooting</a></div>
</center>

<div id="iDisplay"></div>
[/code]
Copy linkTweet thisAlerts:
@MindzaiMay 18.2009 — or just work with your colleagues instead of against them...
Copy linkTweet thisAlerts:
@ehimeauthorMay 18.2009 — or just work with your colleagues instead of against them...[/quote]


After 7mths, I'm sick of playing nice. ?
Copy linkTweet thisAlerts:
@MindzaiMay 18.2009 — Sounds like you need a new job.
Copy linkTweet thisAlerts:
@ehimeauthorMay 19.2009 — When the economy stables out I probably will. Until then though....

I'd appreciate some help on this. ?
×

Success!

Help @ehime spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...