Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8924325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:22:53+00:00 2026-06-15T07:22:53+00:00

I have a little php framework for HTML development. I basically made HTML semi-functional

  • 0

I have a little php framework for HTML development. I basically made HTML semi-functional by writing functions that return some HTML markup. For example:

P('Some, text' . a('Link', '#'), 'my_class);

returns something like this:

<p class="my_class">Some, text<a href="#">Link</a></p>

Apart from being shorter to write, it is also a lot faster, not only because it is shorter, but because there are less weird combination of characters needed to type the function calls than there are to type the equivalent markup.

This framework is still under development, but I use it across different projects. My current layout is this:

~/publkic_html/
   ->core/
   ->project_1/
     ->core/
   ->project_2/
     ->core/
   ->project_3/
     ->core/

As you can see, the framework is called core, and I have one copy of it at the top directory, then, each project has its own copy. What I currently do, which is not any form of version control, is I copy the core on a project back to the top directory core when I make changes to the core of that project.

For example, lets imagine I’m working on project_1, and I realize there is something that I need to be added to core, so I add it. Then I copy the core on project_1 to the top core with this:

cp -rvu ~/public_html/project_1/core/ ~/public_html/

I do a recursive update. I like verbose because I can see what is being copied.

When I need to work on another project, lets say project_2, I do the opposite, updating project_2/core/ with the contents from ~/public_html/core

As you can see this is a problem. Not only is it annoying, but it is also very prone to problems. For example, I could forget to do an update after changing a core that is local to a project. This introduces a lot of problems, like changing the same file on two different projects without updating will likely result on changes being overwritten and lost.

How can I manage this in a more efficient and safe way? Not to mention saner!

I was looking at git, but is seems that I would just end up with many different version-controlled version of core.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:22:55+00:00Added an answer on June 15, 2026 at 7:22 am

    You can (really – must) use any SCM, which allow code re-use and share (instead of cloning) (and I don’t know any VCS, which does NOT have this feature)

    1. Subversion
      • externals
    2. Mercurial
      • Subrepo (guestrepo)
    3. Git
      • Submodules (git-subtree)

    PS: Git as first VCS is worst choice

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a little problem with some preg_replace functions in PHP. First I have
I have made a little framework for php. In this project I have the
I once saw a framework or code from some PHP that had an error
Our website code is written in PHP. We have very little testing in regards
This is a little tricky so bear with me: I have a PHP script
its a little bit hard to understand. in the header.php i have this code:
I have little unusual problem to solve. I need some hint or links to
I have little doubt about string reading in C. string reading functions like gets,
I wrote my own little PHP MVC Framework, and now Im exploring caching strategies
I have a lithium app set up that way, so when return($data) is used

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.