Search
 
SCRIPT & CODE EXAMPLE
 

PHP

take file data in variable php

I suppose you want to get the content generated by PHP, if so use:

$Vdata = file_get_contents('http://YOUR_HOST/YOUR/FILE.php');

Otherwise if you want to get the source code of the PHP file, its the same as 
a .txt file:

$Vdata = file_get_contents('path/to/YOUR/FILE.php');
Comment

take file data in variable php

ob_start();

include "yourfile.php";

$myvar = ob_get_clean();

reference :
https://stackoverflow.com/questions/1272228/how-do-i-load-a-php-file-into-a-variable
https://secure.php.net/manual/en/function.ob-get-clean.php 
Comment

PREVIOUS NEXT
Code Example
Php :: php pdo database connection 
Php :: download laravel 8 zip 
Php :: debian php switch version 
Php :: php get first word of string 
Php :: php server sent events 
Php :: download file php 
Php :: public_path laravel 
Php :: php date add days 
Php :: laravel where closure 
Php :: 2 decimal round using php 
Php :: php link to page 
Php :: enque scripts from plugin 
Php :: print array on php 
Php :: installing bootstrap on laravel8 
Php :: convert timestamp to date php 
Php :: php button to another page 
Php :: IlluminateDatabaseQueryExcep Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`)) laravel 
Php :: laravel get first letter of each word 
Php :: php replace string within string 
Php :: insert data using mysqli in php 
Php :: convert array to stdclass object in php example 
Php :: live update mysql data in php 
Php :: json_encode() in php 
Php :: use id as key in co;lection laravel 
Php :: php login google api 
Php :: how to insert date in mysql using php 
Php :: php print_r 
Php :: php add to existing associative array 
Php :: reset array keys php 
Php :: wp post featured image not showing admin 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =