Welcome Guest, Not a member yet? Register   Sign In
possible to have a global file folder model multiple site?
#1

[eluser]Spectruman[/eluser]
assuming I have multiple site, the folder model has a file with methods are the same for all, how to put a global this file has folder model for all. Just as today you can put a single core for all
#2

[eluser]Spectruman[/eluser]
[quote author="Spectruman" date="1297887162"]assuming I have multiple site, the folder model has a file with methods are the same for all, how to put a global this file has folder model for all. Just as today you can put a single core for all[/quote]

HELP!!
nobody can help?
#3

[eluser]ecsyle31[/eluser]
You could probably accomplish this with symlinks. Create a symlink to the shared model file.
#4

[eluser]Spectruman[/eluser]
[quote author="rlindauer" date="1297903552"]You could probably accomplish this with symlinks. Create a symlink to the shared model file.[/quote]

how would this idea into practice, please show an example because I did not understand how it would work.
#5

[eluser]ecsyle31[/eluser]
You have a directory for the shared model, then you would just create a symlink to those shared files in your applications model directory.

For example your shared model directory is under /home, say: /home/shared/models/my_model.php

Then in your application directory, you create a symlink to that file. Say your app directory is at /var/www/html/application

You'd do this:
Code:
ln -s /home/shared/models/my_model.php /var/www/html/application/models/my_model.php

Now codeigniter will see that model file in your model directory.

Symlinks = http://ss64.com/bash/symlink.html
#6

[eluser]Spectruman[/eluser]
[quote author="rlindauer" date="1297925191"]You have a directory for the shared model, then you would just create a symlink to those shared files in your applications model directory.

For example your shared model directory is under /home, say: /home/shared/models/my_model.php

Then in your application directory, you create a symlink to that file. Say your app directory is at /var/www/html/application

You'd do this:
Code:
ln -s /home/shared/models/my_model.php /var/www/html/application/models/my_model.php

Now codeigniter will see that model file in your model directory.

Symlinks = http://ss64.com/bash/symlink.html[/quote]

assuming that I can not make a symbolic link by limitations of web hosting. Have a way to put this by the framework this global model include or variable constate call php?

as is done in core ci could do something similar or has other means more accurate
Code:
$system_path = "../ci_core";
$model_path_global = "../model";
#7

[eluser]Spectruman[/eluser]
[quote author="Spectruman" date="1297960977"][quote author="rlindauer" date="1297925191"]You have a directory for the shared model, then you would just create a symlink to those shared files in your applications model directory.

For example your shared model directory is under /home, say: /home/shared/models/my_model.php

Then in your application directory, you create a symlink to that file. Say your app directory is at /var/www/html/application

You'd do this:
Code:
ln -s /home/shared/models/my_model.php /var/www/html/application/models/my_model.php

Now codeigniter will see that model file in your model directory.

Symlinks = http://ss64.com/bash/symlink.html[/quote]

assuming that I can not make a symbolic link by limitations of web hosting. Have a way to put this by the framework this global model include or variable constate call php?

as is done in core ci could do something similar or has other means more accurate
Code:
$system_path = "../ci_core";
$model_path_global = "../model";
[/quote]

HELP!!
nobody can help? anyone have a good idea or solution to the case.
#8

[eluser]Spectruman[/eluser]
[quote author="Spectruman" date="1298047333"][quote author="Spectruman" date="1297960977"][quote author="rlindauer" date="1297925191"]You have a directory for the shared model, then you would just create a symlink to those shared files in your applications model directory.

For example your shared model directory is under /home, say: /home/shared/models/my_model.php

Then in your application directory, you create a symlink to that file. Say your app directory is at /var/www/html/application

You'd do this:
Code:
ln -s /home/shared/models/my_model.php /var/www/html/application/models/my_model.php

Now codeigniter will see that model file in your model directory.

Symlinks = http://ss64.com/bash/symlink.html[/quote]

assuming that I can not make a symbolic link by limitations of web hosting. Have a way to put this by the framework this global model include or variable constate call php?

as is done in core ci could do something similar or has other means more accurate
Code:
$system_path = "../ci_core";
$model_path_global = "../model";
[/quote]

HELP!!
nobody can help?[/quote]

Anyone have a good idea or solution to the case.




Theme © iAndrew 2016 - Forum software by © MyBB